Class: SimpleCov::ExitCodes::BaselineCheck

Inherits:
Check
  • Object
show all
Defined in:
lib/simplecov/exit_codes/baseline_check.rb

Overview

Fails when a file listed in the checked-in baseline drops below its own floor on both axes: a lower percent than the floor records and more misses than it allows. The second condition is the dampener that keeps an edit with no coverage change from failing the run; a percent-only floor is decided by the percent alone.

Instance Method Summary collapse

Methods inherited from Check

#failing?, #report, #report_lines, #violations

Constructor Details

#initialize(result, baseline) ⇒ BaselineCheck

Returns a new instance of BaselineCheck.



11
12
13
14
# File 'lib/simplecov/exit_codes/baseline_check.rb', line 11

def initialize(result, baseline)
  super(result, nil)
  @baseline = baseline
end

Instance Method Details

#exit_codeObject



16
17
18
# File 'lib/simplecov/exit_codes/baseline_check.rb', line 16

def exit_code
  MINIMUM_COVERAGE
end