Skip to content

Commit 10c1dff

Browse files
petertellgrenPragTob
authored andcommitted
Bugfix maximum coverage drop with old .last_run file
1 parent 120d0ea commit 10c1dff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

features/maximum_coverage_drop.feature

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Feature:
145145
require 'simplecov'
146146
SimpleCov.start do
147147
add_filter 'test.rb'
148+
maximum_coverage_drop 0
148149
end
149150
"""
150151
And the file "coverage/.last_run.json" with:

lib/simplecov/exit_codes/maximum_coverage_drop_check.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def compute_coverage_drop_data
6262
def last_coverage(criterion)
6363
last_coverage_percent = last_run[:result][criterion]
6464

65-
if !last_coverage_percent && criterion == "line"
65+
if !last_coverage_percent && criterion == :line
6666
last_run[:result][:covered_percent]
6767
else
6868
last_coverage_percent

0 commit comments

Comments
 (0)