Cucumber / Capybara测试不再在Rails 3项目中运行 [英] 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"'
我想要做的是运行
bundle exec cucumber features/signing_in.feature
我无法运行任何测试。
capybara-0.4.0
cucumber-rails-0.3.2
cucumber-0.9.2
我重新运行了黄瓜的安装脚本。让我也补充一点,我不知道在Capybara :: Drive :: RackTest中尝试调用Node。
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.
推荐答案
p>...问题...黄瓜猴 - 修补了不再存在的水豚方法...注释掉'黄瓜/ capybara-javascript-emulation'...错误会消失
"...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
$ features/support/env.rb
HAPPY CODING !!
HAPPY CODING!!
http://github.com/jnicklas/capybara / issues / issue / 87 /#issue / 87 / comment / 433959
这篇关于Cucumber / Capybara测试不再在Rails 3项目中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!