64
rated 0 times
[
65]
[
1]
/ answers: 1 / hits: 85970
/ 10 Years ago, wed, november 12, 2014, 12:00:00
Say I'm spying on a method like this:
spyOn(util, foo).andReturn(true);
The function under test calls util.foo
multiple times.
Is it possible to have the spy return true
the first time it's called, but return false
the second time? Or is there a different way to go about this?
More From » unit-testing