Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No good way to specify ordered verification with spies #74

Open
mcmire opened this issue Nov 14, 2011 · 0 comments
Open

No good way to specify ordered verification with spies #74

mcmire opened this issue Nov 14, 2011 · 0 comments
Labels

Comments

@mcmire
Copy link
Collaborator

mcmire commented Nov 14, 2011

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant