Double RR to return different results

2 Jul 2013

You can just mock it twice:

mock(favor).test(1) { true } mock(favor).test(1) { false }

The first time it is invoked it will return true, and the second time it will return false.

It is super intuitive!

I tried to do this even without looking at the document, and it just works.

Give it a kudos