From 0ed27919a5b6512c4a19f3a3c97ea89d94fc5cbb Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Thu, 18 Jul 2024 16:24:31 +0200 Subject: [PATCH] Condition SimpleCov features by version --- spec/spec_helper/simplecov.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/spec_helper/simplecov.rb b/spec/spec_helper/simplecov.rb index 4f6719c..a208ed9 100644 --- a/spec/spec_helper/simplecov.rb +++ b/spec/spec_helper/simplecov.rb @@ -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