[英]Removing the default test suite from ruby on rails 4
When I create a rails app I usually do it like: 当我创建一个Rails应用程序时,通常会这样做:
rails new <app> --skip-test-suite
No I have an app where I forgot to add the param --skip-test-suite
and I would want to use RSPEC
instead of the default test suite. 不,我有一个应用程序,忘记了添加参数--skip-test-suite
,我想使用RSPEC
而不是默认的测试套件。 How can I get rid of the default? 如何摆脱默认设置? Can I just remove the test
directory and what gems would I need to get rid of? 我可以只删除test
目录,而要删除哪些gem?
If you are using Rails 3, to totally remove TestUnit from your application, remove this line from your config/application.rb 如果您使用的是Rails 3,要从应用程序中完全删除TestUnit,请从config / application.rb中删除此行。
require "rails/test_unit/railtie"
And add this to config/application.rb 并将其添加到config / application.rb
config.generators do |g|
g.test_framework :rspec
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.