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

Methods

Attributes

exception  [R] 

Public Class methods

[Source]

     # File lib/spec/runner/reporter.rb, line 99
 99:         def initialize(example_name, exception)
100:           @example_name = example_name
101:           @exception = exception
102:         end

Public Instance methods

[Source]

     # File lib/spec/runner/reporter.rb, line 118
118:         def expectation_not_met?
119:           @exception.is_a?(Spec::Expectations::ExpectationNotMetError)
120:         end

[Source]

     # File lib/spec/runner/reporter.rb, line 104
104:         def header
105:           if expectation_not_met?
106:             "'#{@example_name}' FAILED"
107:           elsif pending_fixed?
108:             "'#{@example_name}' FIXED"
109:           else
110:             "#{@exception.class.name} in '#{@example_name}'"
111:           end
112:         end

[Source]

     # File lib/spec/runner/reporter.rb, line 114
114:         def pending_fixed?
115:           @exception.is_a?(Spec::DSL::PendingFixedError)
116:         end

[Validate]