gpt4 book ai didi

ruby-on-rails - rspec 如何与 Rails 3 一起进行集成测试?

转载 作者:行者123 更新时间:2023-12-04 06:03:42 25 4
gpt4 key购买 nike

我想要做的是做 在 rails3 中使用 webrat 进行集成测试 就像 Yehuda 在 http://pivotallabs.com/talks/76-extending-rails-3 中对测试单元所做的那样第 34 分钟。

一个例子:

describe SomeApp
it "should show the index page"
visit "/"
body.should =~ /hello world/
end
end

有人知道这样做的方法吗?

最佳答案

您是否尝试过使用 rspec-rails:http://github.com/rspec/rspec-rails

这是新 RSpec 2.0 的存储库(自述文件中的安装说明),它将与 Rails 3 一起使用。

关于ruby-on-rails - rspec 如何与 Rails 3 一起进行集成测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2131645/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com