Class: CI::Reporter::RSpec2Failure

Inherits:
RSpecFailure show all
Defined in:
lib/ci/reporter/rspec.rb

Instance Attribute Summary

Attributes inherited from RSpecFailure

#exception

Instance Method Summary collapse

Methods inherited from RSpecFailure

#error?, #location, #message, #name

Constructor Details

#initialize(example) ⇒ RSpec2Failure

Returns a new instance of RSpec2Failure.



52
53
54
55
# File 'lib/ci/reporter/rspec.rb', line 52

def initialize(example)
  @example = example
  @exception = @example.execution_result[:exception] || @example.execution_result[:exception_encountered]
end

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'lib/ci/reporter/rspec.rb', line 57

def failure?
  exception.is_a?(::RSpec::Expectations::ExpectationNotMetError)
end