Module: Bacon::TapOutput
- Defined in:
- lib/vendor/bacon.rb
Instance Method Summary collapse
- #handle_requirement(description) ⇒ Object
- #handle_specification(name) ⇒ Object
- #handle_summary ⇒ Object
Instance Method Details
#handle_requirement(description) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/vendor/bacon.rb', line 77 def handle_requirement(description) ErrorLog.replace "" error = yield if error.empty? printf "ok %-3d - %s\n" % [Counter[:specifications], description] else printf "not ok %d - %s: %s\n" % [Counter[:specifications], description, error] puts ErrorLog.strip.gsub(/^/, '# ') end end |
#handle_specification(name) ⇒ Object
75 |
# File 'lib/vendor/bacon.rb', line 75 def handle_specification(name) yield end |
#handle_summary ⇒ Object
89 90 91 92 93 |
# File 'lib/vendor/bacon.rb', line 89 def handle_summary puts "1..#{Counter[:specifications]}" puts "# %d tests, %d assertions, %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end |