How to Get RSpec to Skip View Specs When You Generate Scaffolds

by Jason Swett,

I personally don’t find much value in tests for views, helpers, routes or requests in most cases.

It’s annoying to have to delete these files each time you generate a new scaffold. Fortunately, it’s possible to configure RSpec not to generate these files.

Below is an example of how you can exclude these types of spec (and more) from being generated when you generate a new scaffold.

Leave a Reply

Your email address will not be published. Required fields are marked *