Today I Learned

A Hashrocket project

Rails Generate, No Tests

Rails generators do a lot of things, such as adding boilerplate (assert true) tests.

Exclude these files with --no-test-framework:

$ rails generate model foobar --no-test-framework

An alternative would be setting this in your app’s configuration; this is the more granular approach.

Looking for help? Hashrocket has been an industry leader in Ruby on Rails since 2008. Rails is a core skill for each developer at Hashrocket, and we'd love to take a look at your project. Contact us and find out how we can help you.