lib/rspec_tracer/coverage_reporter.rb in rspec-tracer-0.6.1 vs lib/rspec_tracer/coverage_reporter.rb in rspec-tracer-0.6.2
- old
+ new
@@ -27,14 +27,18 @@
@coverage = peek_coverage
end
def compute_diff(example_id)
peek_coverage.each_pair do |file_path, current_stats|
- if @coverage.key?(file_path)
- existing_file_diff_coverage(example_id, file_path, current_stats)
- else
+ unless @coverage.key?(file_path)
missing_file_diff_coverage(example_id, file_path, current_stats)
+
+ next
end
+
+ next if current_stats == @coverage[file_path]
+
+ existing_file_diff_coverage(example_id, file_path, current_stats)
end
end
def generate_final_examples_coverage
filtered_files = Set.new