From 8e7ab794ef40e57bcbcfba4989329ef068885d70 Mon Sep 17 00:00:00 2001 From: Eric Mueller Date: Thu, 9 May 2024 19:25:55 -0400 Subject: [PATCH] Use stronger path-matching for simplecov filters 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: https://github.com/simplecov-ruby/simplecov/pull/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. --- script/rspec_with_simplecov | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/script/rspec_with_simplecov b/script/rspec_with_simplecov index fc7c6469de..f40bb29027 100755 --- a/script/rspec_with_simplecov +++ b/script/rspec_with_simplecov @@ -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