diff --git a/mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/KStubbing.kt b/mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/KStubbing.kt index 48442400..e1fdddc1 100644 --- a/mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/KStubbing.kt +++ b/mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/KStubbing.kt @@ -39,7 +39,7 @@ inline fun stubbing( KStubbing(mock).stubbing(mock) } -inline fun T.stub(stubbing: KStubbing.(T) -> Unit): T { +inline infix fun T.stub(stubbing: KStubbing.(T) -> Unit): T { return apply { KStubbing(this).stubbing(this) } } @@ -81,4 +81,4 @@ class KStubbing(val mock: T) { ): OngoingStubbing { return runBlocking { Mockito.`when`(mock.m()) } } -} \ No newline at end of file +}