This is a backport from master for a bug that happens also on the Rails 2.x version, 0.3.2.
With this patch you might consider releasing 0.3.3.
Backport part of 5347394
If I understand correctly this would break cucumber-rails so it no longer works with the current Capybara (1.1.2).
Please request this to be re-opened if you think I'm mistaken.
It's intended for the rails 2 compatible release, which it'd be nice to have a branch for, as people still need to maintain those apps and run those tests.
It doesn't seem to work for me. I get a new error:
I've removed the emulation require from support/env.rb and put this patched code into a support file; I get a new error
undefined local variable or method `node' for #<Capybara::RackTest::Node:0x5019d20> (NameError)
I'm using cucumber-rails 0.3.2, cucumber 1.1.9, capybara 1.1.1, REE 1.8.7 (and bundler) on Ubuntu.
I've loaded the new code by removing the old emulation require from env.rb (which I had to do to make the tests run at all) then add the patched code as a support file.
Oh I see. So this would be for a cucumber-rails 0.3.3 release?
Yes that's right.
I'll defer to others on whether it works, as I don't have a clean test setup and I've switched the scenarios I needed it for to run with selenium.
Another good solution that I think should be with 0.3.3 is to remove the
from the features/support/env.rb generator.
Removing this also solves the problem.
There are two problems as I see it, one is the generator and the other is existing test suites.
The generator can easily be fixed by removing the require as suggested. Does anyone make new apps with these old versions though?
For me, the real problem is people with existing suites (doing maintenance work on old projects) looking to run their old test suite. It'd be great if they were fully locked down, but bundler wasn't around back then (and requires gem/rails updates), and selenium is dependent on Firefox which updates frequently & requires selenium-webdriver / Capybara updates. I found updating versions tricky, and none of the prescribed version combinations worked with js emulation.
@brauliobo it might sound like a strange question, but have you been able to run tests using your patch? Which gem versions do you use? I'm interested whether it's just me that it's not working for.
@nruth I also had the mentioned error.
To solve it I had to cherry-pick yet another commit: 68044f4 (Fix click_link fails with Capybara >= 0.4.0)
Try my branch #213, please.
@nruth yeah, I was able to run some tests, but then I had to change env.rb like I said. this pull request doesn't fix this last one
I'm not sure which one is best, this PR or #213?
Closing old issues. If they are still relevant, please reopen