In Files

Files

Bacon::TestUnitOutput::TapOutput

Public Instance Methods

handle_requirement(description) click to toggle source
    # File lib/bacon.rb, line 81
81:     def handle_requirement(description)
82:       ErrorLog.replace ""
83:       error = yield
84:       if error.empty?
85:         puts "ok %-3d - %s" % [Counter[:specifications], description]
86:       else
87:         puts "not ok %d - %s: %s" %
88:           [Counter[:specifications], description, error]
89:         puts ErrorLog.strip.gsub(/^/, '# ')  if Backtraces
90:       end
91:     end
handle_specification(name) click to toggle source
    # File lib/bacon.rb, line 79
79:     def handle_specification(name)  yield  end
80: 
81:     def handle_requirement(description)
82:       ErrorLog.replace ""
83:       error = yield
84:       if error.empty?
85:         puts "ok %-3d - %s" % [Counter[:specifications], description]
86:       else
87:         puts "not ok %d - %s: %s" %
88:           [Counter[:specifications], description, error]
89:         puts ErrorLog.strip.gsub(/^/, '# ')  if Backtraces
90:       end
91:     end
92: 
93:     def handle_summary
94:       puts "1..#{Counter[:specifications]}"
95:       puts "# %d tests, %d assertions, %d failures, %d errors" %
96:         Counter.values_at(:specifications, :requirements, :failed, :errors)
97:     end
98:   end
handle_summary() click to toggle source
    # File lib/bacon.rb, line 93
93:     def handle_summary
94:       puts "1..#{Counter[:specifications]}"
95:       puts "# %d tests, %d assertions, %d failures, %d errors" %
96:         Counter.values_at(:specifications, :requirements, :failed, :errors)
97:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.