reflectiveStubs

inline fun <T : Any> T.reflectiveStubs(stubbing: ReflectiveStubbing<T>.() -> Unit): T

Apply reflective stubs to an existing mockK.

Sample Usage (to support a builder):

val obj = mockk() obj.reflectiveStubs { defaultAnswer { self } }

Receiver

Must be a mockK.