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 45
45:       def dump
46:         @formatters.each{|f| f.start_dump}
47:         dump_failures
48:         @formatters.each do |f| 
49:           f.dump_summary(duration, @example_names.length, @failures.length, @pending_count)
50:           f.close
51:         end
52:         @failures.length
53:       end

[Source]

    # File lib/spec/runner/reporter.rb, line 40
40:       def end
41:         @end_time = Time.new
42:       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_pending(@behaviour_names.last, name)
25:         elsif error.nil?
26:           example_passed(name)
27:         elsif Spec::DSL::ExamplePendingError === error
28:           example_pending(@behaviour_names.last, name, error.message)
29:         else
30:           example_failed(name, error, failure_location)
31:         end
32:       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 34
34:       def start(number_of_examples)
35:         clear!
36:         @start_time = Time.new
37:         @formatters.each{|f| f.start(number_of_examples)}
38:       end

[Validate]