Skip to content

Commit

Permalink
Condition SimpleCov features by version
Browse files Browse the repository at this point in the history
  • Loading branch information
lloeki committed Jul 18, 2024
1 parent ba7616f commit 0ed2791
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/spec_helper/simplecov.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
]

# Ruby 2.5+
enable_coverage :branch
primary_coverage :branch
if RUBY_VERSION >= "2.5."
enable_coverage :branch
# primary_coverage :branch
end

# Ruby 3.2+
enable_coverage_for_eval
enable_coverage_for_eval if RUBY_VERSION >= "3.2."
end

SimpleCov.start
Expand Down

0 comments on commit 0ed2791

Please sign in to comment.