Skip to content

Commit 77db5ea

Browse files
committed
Fix max_complexity_reached: use actual run max, not 1000
When there are no failures, max_complexity_reached was set to max_possible (1000) instead of the highest complexity actually present in the run. Now uses sorted_complexities.max so a suite with max complexity 500 shows '500 of 1000' not '1000 of 1000'.
1 parent 7670ac8 commit 77db5ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/liquid/spec/cli/runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def run_specs_frozen(config, options, run_id)
498498
max_complexity_reached = if first_failure_complexity
499499
sorted_complexities.select { |c| c < first_failure_complexity }.max || 0
500500
else
501-
max_possible
501+
sorted_complexities.max || 0
502502
end
503503

504504
if json_mode

0 commit comments

Comments
 (0)