Skip to content

Commit c1a7e44

Browse files
coorassesferik
authored andcommitted
Remove method and all expectations
1 parent 9588772 commit c1a7e44

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

lib/simplecov/source_file.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ def ensure_remove_undefs(file_lines)
252252
end
253253

254254
def build_lines
255-
coverage_exceeding_source_warn if coverage_data["lines"].size > src.size
256255
lines = src.map.with_index(1) do |src, i|
257256
SimpleCov::SourceFile::Line.new(src, i, coverage_data["lines"][i - 1])
258257
end

spec/source_file_spec.rb

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -364,30 +364,6 @@
364364
it "has 16 source lines regardless of extra data in coverage array" do
365365
expect(subject.lines.count).to eq(16)
366366
end
367-
368-
it "does not emit a warning now that excess entries are trimmed" do
369-
expect(capture_stderr { subject.lines }).to eq("")
370-
end
371-
end
372-
373-
# Reproduces https://github.com/simplecov-ruby/simplecov/issues/1057
374-
# ERB compiles a template into Ruby with a trailing `_erbout` line, so when
375-
# `enable_coverage_for_eval` is on (common for Rails view specs), Ruby's
376-
# Coverage reports more lines than the .erb file has.
377-
context "a source file tracked via enable_coverage_for_eval on an ERB template" do
378-
require "erb"
379-
let(:lines) { ERB.new(File.read(erb_file), trim_mode: "<>").src.lines }
380-
let(:erb_file) { source_fixture("issue_1057.erb") }
381-
let(:compiled_line_count) { lines.size }
382-
let(:coverage_data) { {"lines" => Array.new(compiled_line_count, 1), "branches" => {}} }
383-
384-
subject { SimpleCov::SourceFile.new(erb_file, coverage_data) }
385-
386-
it "does not emit a warning about coverage exceeding source" do
387-
puts lines
388-
expect(compiled_line_count).to be > File.readlines(erb_file).size
389-
expect(capture_stderr { subject.lines }).to eq("")
390-
end
391367
end
392368

393369
context "A file that has inline branches" do

0 commit comments

Comments
 (0)