Capybara 需要 JRuby 吗?

发布于 2024-09-29 15:30:10 字数 233 浏览 0 评论 0原文

我正在构建一个 Rails 3 应用程序。我正在尝试和水豚一起学习黄瓜。

  • 我需要 JRuby 才能通过 Cucumber 运行 Capybara 吗?

我用过Webrat,但是很多人似乎都在用Capybara, 所以我很想尝试。

我不需要立即进行 JavaScript 测试,但我想安装 水豚如果我最后需要的话。

我读了又读 Capybara 文档,但无法理解。

I'm building a Rails 3 app. I'm trying to learn Cucumber with Capybara.

  • Do I need JRuby to run Capybara via Cucumber?

I've used Webrat, but many people seem to be using Capybara,
so I'd love to try.

I don't need JavaScript testing right away, but I want to install
Capybara if I need in the end.

I read and read the Capybara documentation, but couldn't understand.

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

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

发布评论

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

评论(2

世界等同你 2024-10-06 15:30:10

Capybara 不需要 jRuby 或 Selenium-RC 驱动程序。

只需执行以下操作即可使用 Capybara 设置 Cucumber。

$ gem install capybara cucumber
$ rails generate cucumber --capybara

Capybara does not require jRuby or the Selenium-RC drivers.

Simply do the following to setup Cucumber with Capybara.

$ gem install capybara cucumber
$ rails generate cucumber --capybara
入画浅相思 2024-10-06 15:30:10

I haven't used Capybara myself, but from what I can glean from the readme, it doesn't look like it requires JRuby, depending on the JavaScript driver you use. For instance, if you want to use Culerity, then yes you need JRuby, since it needs to be in your path.

Are you having difficulty installing Capybara?

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