Exclude vendor files from Simplecov reports

I just want to exclude the display of the supplier’s gems using the coverage report, how do I do this?

Here's what my coverage report looks like:

Report

+5
source share
2 answers

That's how I dealt with this, I realized that there is documentation there!

SimpleCov.profiles.define 'no_vendor_coverage' do load_profile 'rails' add_filter 'vendor' # Don't include vendored stuff end SimpleCov.start 'no_vendor_coverage' 
+8
source

You can exclude the suppliers folder adding a filter to spec_helper.rb or where you define the configuration for SimpleCov

 SimpleCov.start 'rails' do add_filter 'vendor' end 
+1
source

Source: https://habr.com/ru/post/1232114/


All Articles