Class: Usps::Support::Lib::SimpleCov::UncoveredLinesFormatter
- Inherits:
-
Object
- Object
- Usps::Support::Lib::SimpleCov::UncoveredLinesFormatter
- Defined in:
- lib/usps/support/lib/simple_cov/uncovered_lines_formatter.rb
Overview
Simple coverage formatter to display paths of any uncovered lines
Intended to make it quicker to know what was uncovered, especially when running in GitHub Actions
rubocop:disable Rails/Output
Instance Attribute Summary collapse
-
#uncovered_files ⇒ Object
readonly
Returns the value of attribute uncovered_files.
Instance Method Summary collapse
Instance Attribute Details
#uncovered_files ⇒ Object (readonly)
Returns the value of attribute uncovered_files.
9 10 11 |
# File 'lib/usps/support/lib/simple_cov/uncovered_lines_formatter.rb', line 9 def uncovered_files @uncovered_files end |
Instance Method Details
#format(result) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/usps/support/lib/simple_cov/uncovered_lines_formatter.rb', line 11 def format(result) @uncovered_files = result.files.reject { it.missed_lines.empty? } return unless uncovered_files.any? puts 'Uncovered lines:' uncovered_files.each { report(it) } end |