Skip to content

Commit

Permalink
Adding coverage support when COVERAGE is enabled (#385)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Tanaka <[email protected]>
  • Loading branch information
pedro-stanaka authored Oct 29, 2024
1 parent 970b8dd commit 4de98f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Gemfile.lock
pkg/*
vendor/
tmp/*
coverage/*
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ gem "rubocop", ">= 1.0"
gem "rubocop-shopify", require: false
gem "benchmark-ips"
gem "dogstatsd-ruby", "~> 5.0", require: false
gem "simplecov", require: false, group: :test
platform :mri do
# only if Ruby is MRI && >= 3.2
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.2")
Expand Down
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

ENV["ENV"] = "test"

if ENV["COVERAGE"]
require "simplecov"
SimpleCov.start
end
# Previous content of test helper now starts here
unless ENV.key?("CI")
require "minitest/pride"
end
Expand Down

0 comments on commit 4de98f4

Please sign in to comment.