ext

context(scope: MokkeryTemplatingScope)
inline fun <T, R> T.ext(block: T.() -> R): R(source)

Allows mocking methods with extension receiver.

Example:

interface Foo {
fun Int.foo(): Int
}

val mock = mock<Foo>()
every { mock.ext { any<Int>().foo() } } returnsArgAt 0