Skip to content

Conversation

@nhaarman
Copy link
Collaborator

Fixes #47.

Calls to mock() can now pass a lambda that allows for easy stubbing:

interface MyInterface {
    fun text() : String
}

val mock = mock<MyInterface> {
    on { text() } doReturn "test"
   on { test() }.doReturn("test")
}

@nhaarman nhaarman merged commit 2a2ed98 into dev Aug 19, 2016
@nhaarman nhaarman deleted the mock-stubbing branch August 19, 2016 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants