Rspec 集成测试没有黄瓜?

发布于 2024-07-24 03:45:33 字数 70 浏览 5 评论 0原文

有没有一种方法可以在不使用 Cucumber 的情况下使用 Rspec 进行集成测试? 我更喜欢使用普通的旧 Webrat。

Is there a way to do integration tests with Rspec without using Cucumber? I prefer using just plain old Webrat.

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

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

发布评论

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

评论(3

土豪我们做朋友吧 2024-07-31 03:45:33

最新版本的 RSpec-Rails (1.2.7) 现在具有集成支持。 升级然后开始将规格添加到规格/集成或使用“integration_spec”生成器。 在spec/spec_helper.rb中配置Webrat,就可以了!

The latest version of RSpec-Rails (1.2.7) now has integration support. Upgrade then start adding specs to spec/integration or use the 'integration_spec' generator. Configure Webrat in spec/spec_helper.rb and you're set!

孤者何惧 2024-07-31 03:45:33

我们最近开始将 RSpec 与 Capybara 一起使用,而不是 Cucumber。 这是我最近写的一篇关于在没有 Cucumber 的情况下使用 RSpec 集成测试的“初学者”博客文章。

使用 RSpec 集成测试和 Capybara 进行端到端测试

如果有,请告诉我您对系统设置有任何疑问。

We've recently started using RSpec with Capybara over Cucumber. Here is a "beginners" blog post I recently wrote on using RSpec integration tests without cucumber.

End-to-end testing with RSpec integration tests and Capybara

Let me know if you have any questions on getting your system set up.

画▽骨i 2024-07-31 03:45:33

据我所知,Rspec 完全能够作为集成测试的一部分来测试视图和控制器。 快速浏览一下互联网,就会发现 这篇文章位于 Robby on Rails 上查看测试和一些RSpec 中的 Rdocs 可能会有所帮助。

希望这能为您指明正确的方向 - 恐怕我自己也用黄瓜。

As far as I know Rspec is perfectly capable of testing views and controllers as part of integration tests. A quick look around the internet shows this article at Robby on Rails on view testing and some of the Rdocs within RSpec might help.

Hope this points you in the right direction - I'm afraid I use cucumber myself.

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