Class: RCheck::ReportPrinters::Numbers

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rcheck/report_printers.rb

Instance Method Summary collapse

Methods inherited from Abstract

#initialize

Methods included from Colors::Mixin

#cprint, #cputs, #with_color

Constructor Details

This class inherits a constructor from RCheck::ReportPrinters::Abstract

Instance Method Details

#report(suite) ⇒ Object



105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/rcheck/report_printers.rb', line 105

def report(suite)
  [:error, :fail, :pending, :pass].each do |status|
    items = suite.total(status)
    if items.any?
      cputs status, "%9d  %s" % [items.count, status.to_s.capitalize]
    end
  end
  print '%9d  Assertions' %
    [suite.total(:pass, :fail, :pending).count]
  if suite.total(:error).any?
    cprint :quiet, ' (not accurate)'
  end
end