Does anyone know how to disable the automatic unit test file generation in Rails? Whenever a controller, model or migration is created then it creates the associated files in the test/ directory; I need this disabled.
Also, is it possible to make RPsec take over so that the files are created with RSpec (in the spec/ directory) when a standard rails g model|controller|migration command is performed?
You want something like this in your application.rb
config.generators do |g|
g.test_framework :rspec, :fixture => false
g.view_specs false
g.helper_specs false
end
More info: http://guides.rubyonrails.org/generators.html#customizing-your-workflow
Personally, I use this one:
config.generators do |g|
g.orm :mongoid
g.template_engine :haml
g.test_framework :rspec, :fixture => false
g.view_specs false
g.helper_specs false
g.fixture_replacement :fabrication
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With