-
Notifications
You must be signed in to change notification settings - Fork 526
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
Workaround for RSpec Mocks #1348 #892
base: master
Are you sure you want to change the base?
Conversation
@ojab can you please rebase your branch on master ? |
Sure, done. |
d168f0f
to
0bcc5b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I should add test for that, since it's a workaround that can be dropped if/when rspec-mocks will be fixed.
I think we'd better have a test to check that nothing breaks when/if the workaround is removed.
I still can't get the rationale behind this PR, sorry. What scenario makes one to want this? expect(Draper::ViewContext.current).to receive(:render).and_call_original I'm asking because the scenario or the expectation themselves could be worked around instead. |
Description
Right now it's not possible to do something like
expect(Draper::ViewContext.current).to receive(:render).and_call_original
since it fails, workaround it.Testing
Not sure if I should add test for that, since it's a workaround that can be dropped if/when rspec-mocks will be fixed.
To-Dos
References
self.class.define_method name && send(name)
fails rspec/rspec#58