From 3ee54b1bfaa5928bc2c1c20335695c53033690ed Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 12 Mar 2021 11:03:12 +1100 Subject: [PATCH] Disable code coverage by default We can activate it on demand: COVERAGE=1 bundle exec rspec We often run specs in chunks but simplecov needs all tests to be run. --- spec/coverage_helper.rb | 2 +- spec/spec_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/coverage_helper.rb b/spec/coverage_helper.rb index 0d65e70674..fe51f01771 100644 --- a/spec/coverage_helper.rb +++ b/spec/coverage_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -unless !!ENV['CI'] +if ENV["COVERAGE"] require 'simplecov' SimpleCov.minimum_coverage 54 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ea11c5f95c..c418078f19 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -unless ENV['CI'] +if ENV["COVERAGE"] require 'simplecov' SimpleCov.start 'rails' end