在我的ruby on rails应用程序中,当我运行以下命令时,我无法创建所需的测试文件。
rails generate integration_test named --integration-tool=rspec -s我想创建以下文件
invoke test_unit
create test/integration/named_test.rb然而,我得到了这样的信息:
invoke rspec在我的应用程序中有下面这段代码:
config.generators do |g|
g.test_framework :rspec,
fixtures: true,
view_specs: false,
helper_specs: false,
routing_specs: false,
controller_specs: false,
request_specs: false
g.fixture_replacement :factory_girl, dir: "spec/factories"
end我看不到我错过了什么,
任何建议,
谢谢。
发布于 2017-08-14 03:53:34
Rspec似乎是您的测试框架,就像在您的配置中一样。这就是为什么test_unit不会生成任何文件。另一方面,与IMO相比,rspec更适合运行集成测试。只要遵循任何rspec教程就可以了。
https://stackoverflow.com/questions/45664183
复制相似问题