| Class | Spec::Runner::Reporter |
| In: |
lib/spec/runner/reporter.rb
|
| Parent: | Object |
# File lib/spec/runner/reporter.rb, line 5 5: def initialize(formatters, backtrace_tweaker) 6: @formatters = formatters 7: @backtrace_tweaker = backtrace_tweaker 8: clear! 9: end
# File lib/spec/runner/reporter.rb, line 11
11: def add_behaviour(name)
12: @formatters.each{|f| f.add_behaviour(name)}
13: @behaviour_names << name
14: end
Dumps the summary and returns the total number of failures
# File lib/spec/runner/reporter.rb, line 43
43: def dump
44: @formatters.each{|f| f.start_dump}
45: dump_failures
46: @formatters.each{|f| f.dump_summary(duration, @example_names.length, @failures.length, @not_implemented_count)}
47: @failures.length
48: end
# File lib/spec/runner/reporter.rb, line 20
20: def example_finished(name, error=nil, failure_location=nil, not_implemented = false)
21: @example_names << name
22:
23: if not_implemented
24: example_not_implemented(name)
25: elsif error.nil?
26: example_passed(name)
27: else
28: example_failed(name, error, failure_location)
29: end
30: end
# File lib/spec/runner/reporter.rb, line 16
16: def example_started(name)
17: @formatters.each{|f| f.example_started(name)}
18: end