I am working on a Rails project that has some older code, but I only want to see the coverage of the controllers that I am working on. For example, the structure will be:
controllers/
api/
whatever1/
whatever2/
a_controller.rb
b_controller.rb
I only want to see the coverage for controllers/api/
. I know about the add_filter
method from Simplecov, but adding each one of them would mean a lot of work.
Is there any way to maybe include a regex or some conditional to add filter for everything except the controllers/api
folder?
In your case the best way is to create a new group for the new controllers like that: