Skip to content

Commit

Permalink
Exclude spec/ from simplecov coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzedge committed May 12, 2023
1 parent 91ee8b2 commit 962f8e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/spec_helper.rb
Expand Up @@ -3,6 +3,8 @@
require 'yaml'
require 'simplecov'

COVERAGE_FILTER = %r{/spec/}.freeze

if ENV.key? 'COVERALLS_REPO_TOKEN'
require 'coveralls'

Expand All @@ -11,11 +13,9 @@
Coveralls::SimpleCov::Formatter,
]

Coveralls.wear! do
add_filter '/spec/'
end
Coveralls.wear! { add_filter COVERAGE_FILTER }
else
SimpleCov.start
SimpleCov.start { add_filter COVERAGE_FILTER }
end

require 'rspec'
Expand Down

0 comments on commit 962f8e3

Please sign in to comment.