-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Avoid and_return
with RSpec mocks
#176
Comments
cc @gylaz who first pointed this out to me |
I like to think one reason we use rspec-mocks is for its readability. |
I prefer the second as well. However, if we switch to #175, I think we'll have to use |
Apparently you can do this: allow(user).to receive_messages(title: 'Developer', name: 'Greg') I vote for that if #175 is merged. |
Ooh, I quite like that. |
@jessieay want to reopen this in pull request form? |
Considering |
With RSpec mocks, the following:
is equivalent to:
I prefer the second. Any objections/ideas?
The text was updated successfully, but these errors were encountered: