Skip to content

Commit

Permalink
Use stronger path-matching for simplecov filters
Browse files Browse the repository at this point in the history
The filter for spec/ was actually matching basically everything in the
gem (and discarding it), because it's all in lib/rspec/, and simplecov
is doing a string-based infix match. I'm not certain when that changed,
but my guess is 2018, in this PR:

    simplecov-ruby/simplecov#616

I also adjusted the minimum_coverage down to 99, since we're currently
at 99.26, and not 100%. I'll get on that shortly.
  • Loading branch information
nevinera committed May 9, 2024
1 parent 1e661db commit 8e7ab79
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions script/rspec_with_simplecov
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ begin
require 'simplecov'

SimpleCov.start do
add_filter "bundle/"
add_filter "tmp/"
add_filter "spec/"
minimum_coverage(100)
root File.expand_path("../..", __FILE__)
add_filter %r{/bundle/}
add_filter %r{/tmp/}
add_filter %r{/spec/}
minimum_coverage(99)
end
end
rescue LoadError # rubocop:disable Lint/SuppressedException
Expand Down

0 comments on commit 8e7ab79

Please sign in to comment.