Cucumber/Capybara test no longer run in Rails 3 project

帅比萌擦擦* 提交于 2019-12-09 05:38:54

问题


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.


回答1:


"...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



来源:https://stackoverflow.com/questions/4005424/cucumber-capybara-test-no-longer-run-in-rails-3-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!