Skip to content

Commit

Permalink
Fix coverage v2
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatov committed Jul 9, 2024
1 parent 0e29a91 commit 9148631
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ gem 'rspec_junit_formatter'
gem 'rubocop', '~> 1.64'
gem 'rubocop-rspec', '~> 3.0'

gem 'simplecov', '~> 0.22'
gem 'simplecov_json_formatter'
gem 'simplecov', '~> 0.22', require: false
gem 'simplecov_json_formatter', require: false
14 changes: 11 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# frozen_string_literal: true

require 'bundler/setup'
require 'simplecov'

SimpleCov.start do
add_filter { |src| !src.filename.start_with?("#{SimpleCov.root}/lib") }
if ENV['COVERAGE']
require 'simplecov'

if ENV['CI']
require 'simplecov_json_formatter'
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
end

SimpleCov.start do
add_filter { |src| !src.filename.start_with?("#{SimpleCov.root}/lib") }
end
end

require 'sec_id'
Expand Down

0 comments on commit 9148631

Please sign in to comment.