btakita/rr — Issue #74: No good way to specify ordered verification with spies
Author: mcmire
Created: 2011-11-14 19:36:24+00:00
State: open

There's no way (at least that I can see) to convert the following into a spy format:

mock(user).valid? { true }.once.then.save(:validate => false)
user.some_method_that_calls_valid?_and_save

Ideally I would like to be able to say:

stub(user).valid? { true }
stub(user).save
user.some_method_that_calls_valid?_and_save
user.should have_received.valid?.then.save(:validate => false)