Cucumber/Capybara 测试不再在 Rails 3 项目中运行

发布于 2024-09-28 17:45:36 字数 713 浏览 0 评论 0原文

这些 gem 的最新版本不再相互兼容吗?看来我的包里有些东西出了问题。

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”。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ま昔日黯然 2024-10-05 17:45:36

“...问题...黄瓜猴子修补了不再存在的水豚方法...注释掉'cucumber/capybara-javascript-emulation'...错误将会消失”

$ features/support/env.rb

快乐编码!

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文