Skip to content

Workaround for RSpec Mocks #1348 - #892

Open
ojab wants to merge 1 commit into
drapergem:masterfrom
ojab:patch-1
Open

Workaround for RSpec Mocks #1348#892
ojab wants to merge 1 commit into
drapergem:masterfrom
ojab:patch-1

Conversation

@ojab

@ojab ojab commented Oct 22, 2020

Copy link
Copy Markdown

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
Copy Markdown
Contributor

@ojab can you please rebase your branch on master ?

@ojab

ojab commented Jan 22, 2021

Copy link
Copy Markdown
Author

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

@Alexander-Senko Alexander-Senko left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread lib/draper/helper_proxy.rb
@Alexander-Senko Alexander-Senko added this to the 4.0.3 milestone Aug 31, 2024
@Alexander-Senko

Alexander-Senko commented Oct 3, 2024

Copy link
Copy Markdown
Collaborator

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