Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber/Capybara test no longer run in Rails 3 project

Do the latest versions of these gems not work with each other any more? It appears that something may have gotten out of whack in my bundle.

undefined local variable or method `node' for #<Capybara::Driver::RackTest::Node:0x103e19390> (NameError)
./features/step_definitions/web_steps.rb:35
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:34:in `/^(?:|I )follow "([^"]*)"(?: within "([^"]*)")?$/'
features/signing_in.feature:11:in `And I follow "Login"'

All I am trying to do is run a feature with:

bundle exec cucumber features/signing_in.feature

I can't run any tests.

capybara-0.4.0
cucumber-rails-0.3.2
cucumber-0.9.2

I did re-run the install script for cucumber. Let me also add that I have no idea what is attempting to call "Node" inside of Capybara::Drive::RackTest.

like image 605
AKWF Avatar asked Oct 23 '10 18:10

AKWF


1 Answers

"...problem... cucumber monkey-patches a Capybara method which no longer exists...comment out 'cucumber/capybara-javascript-emulation'... the error will go away"

$ features/support/env.rb

HAPPY CODING!!

http://github.com/jnicklas/capybara/issues/issue/87/#issue/87/comment/433959

like image 180
babybird Avatar answered Oct 04 '22 05:10

babybird