class SimpleCov::Formatter::Base
def stats_line(criterion, stat)
Showing "Branch coverage: 0 / 0 (100.00%)" is noise; the older
measure (e.g. a file with no branches under branch coverage).
Returns nil for branch/method criteria that have nothing to
def stats_line(criterion, stat) return if criterion != :line && !stat.total.positive? percent = SimpleCov.round_coverage(stat.percent) Kernel.format( "%<label>s coverage: %<covered>d / %<total>d (%<percent>s)", label: criterion.to_s.capitalize, covered: stat.covered, total: stat.total, percent: SimpleCov::Color.colorize_percent(percent) ) end