Skip to content

Commit

Permalink
Always avoid coverage on newer rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Apr 16, 2020
1 parent a05ce25 commit 9539053
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/support/simplecov.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# frozen_string_literal: true

require "simplecov" if ENV["NOCOV"].nil? && Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.a")
5 changes: 4 additions & 1 deletion test/support/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ def shell_out_env(simplecov: true)
"RUBYOPT" => "-I #{lib_dir}"
}

base["RUBYOPT"] += " -r simplecov" if simplecov
if simplecov
test_dir = File.expand_path("..", __dir__)
base["RUBYOPT"] += " -r #{test_dir}/support/simplecov.rb"
end

base
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "simplecov" if ENV["NOCOV"].nil? && Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.a")
require "support/simplecov"
require "support/test_case"

Byebug::TestCase.before_suite

0 comments on commit 9539053

Please sign in to comment.