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

Install RSpecMatcherProxies via Object#extend as well #2771

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

Conversation

amatsuda
Copy link
Contributor

@amatsuda amatsuda commented Aug 28, 2024

Here's a fix for the Capybara vs. Cucumber vs. Aruba's all method conflict problem described in #2761

Cucumber's implementation is that it creates a world by mixing-in various modules on top of an anonymous module:
https://github.com/cucumber/cucumber-ruby/blob/v9.2.0/lib/cucumber/glue/proto_world.rb#L176

and Capybara::DSL is mixed-in in this process via Object#extend. Not Module#include nor Module#prepend.

Thus, our DSLRSpecProxyInstaller module has to stand by for self.extended hook in addition to currently implemented ones.

I confirmed that this patch fixes @PragTob's reproduction case in https://github.com/PragTob/all_conflict

fixes #2761

amatsuda added a commit to amatsuda/simplecov that referenced this pull request Aug 30, 2024
amatsuda added a commit to amatsuda/simplecov that referenced this pull request Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clash on all method with aruba/rspec-expectations in cucumber
1 participant