Reputation: 993
I'm using rspec with Rails 4 and when creating controllers, for example, I always have to pass the "--no-test-framework" parameter. Is there a way to not generate these tests by default without needing to explicitly specify it (I often forget and then need to manually delete the generated tests).
Thank you!
Upvotes: 9
Views: 2472
Reputation: 677
Just add the following to config/application.rb
(within the Application class):
config.generators.test_framework false
Upvotes: 20
Reputation:
You can add the following to config/application.rb
to prevent specific specs from generating:
config.generators do |g|
g.controller_specs false
g.view_specs false
g.helper_specs false
g.model_specs false
end
Upvotes: 4