Q: How do you stub a method call for a rails unit test such that it returns a different value the second time it is called?
A: stubs(:foo).returns(1,2)
returns 1 the first call, 2 the second, etc.
Q: How do you stub a method call for a rails unit test such that it returns a different value the second time it is called?
A: stubs(:foo).returns(1,2)
returns 1 the first call, 2 the second, etc.