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

Workaround for RSpec Mocks #1348 #892

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ojab
Copy link

@ojab ojab commented Oct 22, 2020

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

  • tests
  • documentation

References

@ojab ojab marked this pull request as ready for review October 22, 2020 14:27
@n-rodriguez
Copy link
Contributor

@ojab can you please rebase your branch on master ?

@ojab
Copy link
Author

ojab commented Jan 22, 2021

Sure, done.

@Alexander-Senko Alexander-Senko changed the title Workaround https://github.com/rspec/rspec-mocks/issues/1348 Workaround for RSpec Mocks #1348 Aug 30, 2024
Copy link
Collaborator

@Alexander-Senko Alexander-Senko left a 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.

lib/draper/helper_proxy.rb Show resolved Hide resolved
@Alexander-Senko Alexander-Senko added this to the 4.0.3 milestone Aug 31, 2024
@Alexander-Senko
Copy link
Collaborator

Alexander-Senko commented Oct 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants