From 8315047d64632ae46ec68e4617b01e59ad9e6fe0 Mon Sep 17 00:00:00 2001 From: Dave Corson-Knowles Date: Sat, 2 Nov 2024 11:19:55 -0700 Subject: [PATCH 1/2] Update simple_formatter.rb --- lib/simplecov/formatter/simple_formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/simplecov/formatter/simple_formatter.rb b/lib/simplecov/formatter/simple_formatter.rb index b99338c0..4ddcf3fc 100644 --- a/lib/simplecov/formatter/simple_formatter.rb +++ b/lib/simplecov/formatter/simple_formatter.rb @@ -14,7 +14,7 @@ def format(result) output << ("=" * 40) output << "\n" files.each do |file| - output << "#{file.filename} (coverage: #{file.covered_percent.round(2)}%)\n" + output << "#{file.filename} (coverage: #{file.covered_percent.floor(2)}%)\n" end output << "\n" end From 20da95c5ffc476412f3cf1ac452eba07cfa5796f Mon Sep 17 00:00:00 2001 From: Dave Corson-Knowles Date: Sat, 2 Nov 2024 11:33:46 -0700 Subject: [PATCH 2/2] Update coverage_for_eval_spec.rb --- spec/coverage_for_eval_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/coverage_for_eval_spec.rb b/spec/coverage_for_eval_spec.rb index 7677b3a3..7dccc365 100644 --- a/spec/coverage_for_eval_spec.rb +++ b/spec/coverage_for_eval_spec.rb @@ -19,7 +19,7 @@ let(:command) { "ruby eval_test.rb" } it "records coverage for erb" do - expect(@stdout).to include(" 2 / 3 LOC") + expect(@stdout).to include("Line Coverage: 66.67% (2 / 3)") end end end