Could not find explanation about the "just run", what does it mean when stub a function with it?
Will it make the mock object to call its real function, or make the function run a stub which does nothing?
Is there sample for showing some real use case?
@Test
fun `mocking functions that return Unit`() {
val SingletonObject = mockkObject<SingletonObject>()
every { SingletonObject.functionReturnNothing() } just Runs. // ???
SingletonObject.otherMemberFunction(). //which internally calls functionReturnNothing()
//...
}
with or without this every { SingletonObject.functionReturnNothing() } just Runs
stub, the test is doing same.