Module: Bacon::TapOutput
- Defined in:
- lib/mac_bacon.rb
Instance Method Summary collapse
- #handle_requirement_begin(description) ⇒ Object
- #handle_requirement_end(error) ⇒ Object
- #handle_specification_begin(name) ⇒ Object
- #handle_specification_end ⇒ Object
- #handle_summary ⇒ Object
Instance Method Details
#handle_requirement_begin(description) ⇒ Object
80 81 82 |
# File 'lib/mac_bacon.rb', line 80 def handle_requirement_begin(description) ErrorLog.replace "" end |
#handle_requirement_end(error) ⇒ Object
84 85 86 87 88 89 90 91 92 |
# File 'lib/mac_bacon.rb', line 84 def handle_requirement_end(error) if error.empty? puts "ok %-3d - %s" % [Counter[:specifications], description] else puts "not ok %d - %s: %s" % [Counter[:specifications], description, error] puts ErrorLog.strip.gsub(/^/, '# ') if Backtraces end end |
#handle_specification_begin(name) ⇒ Object
77 |
# File 'lib/mac_bacon.rb', line 77 def handle_specification_begin(name); end |
#handle_specification_end ⇒ Object
78 |
# File 'lib/mac_bacon.rb', line 78 def handle_specification_end ; end |
#handle_summary ⇒ Object
94 95 96 97 98 |
# File 'lib/mac_bacon.rb', line 94 def handle_summary puts "1..#{Counter[:specifications]}" puts "# %d tests, %d assertions, %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end |