Class: Covered::BriefSummary
Instance Method Summary collapse
Methods inherited from Summary
#each, #initialize, #print_annotations
Constructor Details
This class inherits a constructor from Covered::Summary
Instance Method Details
#call(wrapper, output = $stdout, before: 4, after: 4) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/covered/summary.rb', line 102 def call(wrapper, output = $stdout, before: 4, after: 4) ordered = [] statistics = self.each(wrapper) do |coverage| ordered << coverage unless coverage.complete? end output.puts statistics.print(output) if ordered.any? output.puts "", "Least Coverage:" ordered.sort_by!(&:missing_count).reverse! ordered.first(5).each do |coverage| path = wrapper.relative_path(coverage.path) output.write Rainbow(path).orange output.puts ": #{coverage.missing_count} lines not executed!" end end end |