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 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