Class Spec::Runner::Reporter
In: lib/spec/runner/reporter.rb
Parent: Object

Methods

Classes and Modules

Class Spec::Runner::Reporter::Failure

Public Class methods

[Source]

   # 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

Public Instance methods

[Source]

    # 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

[Source]

    # 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

[Source]

    # File lib/spec/runner/reporter.rb, line 38
38:       def end
39:         @end_time = Time.new
40:       end

[Source]

    # 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

[Source]

    # File lib/spec/runner/reporter.rb, line 16
16:       def example_started(name)
17:         @formatters.each{|f| f.example_started(name)}
18:       end

[Source]

    # File lib/spec/runner/reporter.rb, line 32
32:       def start(number_of_examples)
33:         clear!
34:         @start_time = Time.new
35:         @formatters.each{|f| f.start(number_of_examples)}
36:       end

[Validate]