-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Clashes with capybara inside of cucumber on the all
method
#927
Comments
@PragTob just to summarize, the problem is that aruba requires rspec-expectations, and that causes problems in the simplecov test suite because that test suite also requires capybara, and capybara's all conflicts with rspec-expectations' all? |
@PragTob looking at your original upgrading pull request (simplecov-ruby/simplecov#1088), it looks like both rspec-expectations and capybara were already present and apparently not conflicting before the upgrade. So this used to actually work. |
@mvz yea it used to work, it seems there is a workaround at capybara as detailed: teamcapybara/capybara#2761 - but out of the box it still breaks (see the reproduction repo) but the maintainer there was unresponsive. I wanted to get back to it and see if I can get their workaround to work there as well. My assumption right now is there is a workaround, but capybara doesn't load it when in the cucumber environment (as it does not expect rspec-expectations inside of cucumber). Any way, looks like the fix then is most likely over at capybara (as there already is a workaround from them) and so likely nothing to do over here :) I'd keep it open until it's really figured out though. |
I revisited it and found a manual workaround, I'm hoping to get capybara to fixing the proxy again but not sure teamcapybara/capybara#2761 (comment) |
There's a simple shim you can use to avoid this conflict by including Capybara::RSpecMatcherProxies into the Cucumber world. Requiring it manually isn't enough you need to add it to the Worldable modules @PragTob by doing cf: https://github.com/teamcapybara/capybara/blob/master/lib/capybara/rspec/matcher_proxies.rb |
👓 What did you see?
Basically while trying to upgrade gems the all method from rspec-expectations in aruba clashes with capybara's definition of
all
and hence the tests and upgrade fail. I've created a small reproduction repo here: https://github.com/PragTob/all_conflict✅ What did you expect to see?
I'd wish to be able to use aruba and capybara in the same project, although I acknowledge it's a minority use case
📦 Which tool/library version are you using?
Check the Gemfile.lock from the repro repo: https://github.com/PragTob/all_conflict/blob/main/Gemfile.lock
Should all be most recent
🔬 How could we reproduce it?
Check the repro repo :) https://github.com/PragTob/all_conflict/
📚 Any additional context?
Thanks for all your work! :green
Cross reference, capybare issue: teamcapybara/capybara#2761
The text was updated successfully, but these errors were encountered: