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 84
84:         def initialize(context_name, spec_name, exception)
85:           @context_name = context_name
86:           @spec_name = spec_name
87:           @exception = exception
88:         end

Public Instance methods

[Source]

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

[Source]

    # File lib/spec/runner/reporter.rb, line 90
90:         def header
91:           if expectation_not_met?
92:             "'#{@context_name} #{@spec_name}' FAILED"
93:           else
94:             "#{@exception.class.name} in '#{@context_name} #{@spec_name}'"
95:           end
96:         end

[Validate]