Module: Bacon::SpecDoxOutput
- Included in:
- Bacon
- 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
- #spaces ⇒ Object
Instance Method Details
#handle_requirement_begin(description) ⇒ Object
36 37 38 |
# File 'lib/mac_bacon.rb', line 36 def handle_requirement_begin(description) print "#{spaces} - #{description}" end |
#handle_requirement_end(error) ⇒ Object
40 41 42 |
# File 'lib/mac_bacon.rb', line 40 def handle_requirement_end(error) puts error.empty? ? "" : " [#{error}]" end |
#handle_specification_begin(name) ⇒ Object
28 29 30 |
# File 'lib/mac_bacon.rb', line 28 def handle_specification_begin(name) puts spaces + name end |
#handle_specification_end ⇒ Object
32 33 34 |
# File 'lib/mac_bacon.rb', line 32 def handle_specification_end puts if Counter[:context_depth] == 1 end |
#handle_summary ⇒ Object
44 45 46 47 48 |
# File 'lib/mac_bacon.rb', line 44 def handle_summary print ErrorLog if Backtraces puts "%d specifications (%d requirements), %d failures, %d errors" % Counter.values_at(:specifications, :requirements, :failed, :errors) end |