Module: Bacon::SpecDoxOutput
- Included in:
- Bacon
- Defined in:
- lib/bacon.rb
Instance Method Summary collapse
- #handle_requirement(description) ⇒ Object
- #handle_specification(name) ⇒ Object
- #handle_summary ⇒ Object
- #spaces ⇒ Object
Instance Method Details
#handle_requirement(description) ⇒ Object
46 47 48 49 50 |
# File 'lib/bacon.rb', line 46 def handle_requirement(description) print "#{spaces} - #{description}" error = yield puts error.empty? ? "" : " [#{error}]" end |
#handle_specification(name) ⇒ Object
40 41 42 43 44 |
# File 'lib/bacon.rb', line 40 def handle_specification(name) puts spaces + name yield puts if Counter[:context_depth] == 1 end |
#handle_summary ⇒ Object
52 53 54 55 56 |
# File 'lib/bacon.rb', line 52 def handle_summary print ErrorLog if Backtraces puts "%d specifications (%d requirements), %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end |