Dumps the summary and returns the total number of failures
# File lib/spec/runner/reporter.rb, line 58 58: def dump 59: formatters.each{|f| f.start_dump} 60: dump_pending 61: dump_failures 62: formatters.each do |f| 63: f.dump_summary(duration, @example_count, @failures.length, @pending_count) 64: f.close 65: end 66: @failures.length 67: end
# File lib/spec/runner/reporter.rb, line 53 53: def end 54: @end_time = Time.new 55: end
# File lib/spec/runner/reporter.rb, line 39 39: def example_failed(example, error) 40: backtrace_tweaker.tweak_backtrace(error) 41: failure = Failure.new(@example_group.description, example.description, error) 42: @failures << failure 43: formatters.each do |f| 44: f.example_failed(example, @failures.length, failure) 45: end 46: end
# File lib/spec/runner/reporter.rb, line 27 27: def example_finished(example, error=nil) 28: @example_count += 1 29: 30: if error.nil? 31: example_passed(example) 32: elsif Spec::Example::ExamplePendingError === error 33: example_pending(example, example.location, error.message) 34: else 35: example_failed(example, error) 36: end 37: end
# File lib/spec/runner/reporter.rb, line 16 16: def example_group_started(example_group) 17: @example_group = example_group 18: formatters.each do |f| 19: f.example_group_started(example_group) 20: end 21: end
# File lib/spec/runner/reporter.rb, line 114 114: def backtrace_tweaker 115: @options.backtrace_tweaker 116: end
# File lib/spec/runner/reporter.rb, line 118 118: def dump_failures 119: return if @failures.empty? 120: @failures.inject(1) do |index, failure| 121: formatters.each{|f| f.dump_failure(index, failure)} 122: index + 1 123: end 124: end
# File lib/spec/runner/reporter.rb, line 126 126: def dump_pending 127: formatters.each{|f| f.dump_pending} 128: end
# File lib/spec/runner/reporter.rb, line 130 130: def duration 131: return @end_time - @start_time unless (@end_time.nil? or @start_time.nil?) 132: return "0.0" 133: end
# File lib/spec/runner/reporter.rb, line 135 135: def example_passed(example) 136: formatters.each{|f| f.example_passed(example)} 137: end
# File lib/spec/runner/reporter.rb, line 153 153: def example_pending(example, ignore, message="Not Yet Implemented") 154: @pending_count += 1 155: formatters.each do |formatter| 156: if formatter_uses_deprecated_example_pending_method?(formatter) 157: Spec.warn EXAMPLE_PENDING_DEPRECATION_WARNING 158: formatter.example_pending(example, message, example.location) 159: else 160: formatter.example_pending(example, message) 161: end 162: end 163: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.