Class: CI::Reporter::RSpecFailure
- Inherits:
-
Object
- Object
- CI::Reporter::RSpecFailure
- Defined in:
- lib/ci/reporter/rspec.rb
Overview
Wrapper around a RSpec
error or failure to be used by the test suite to interpret results.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #failure? ⇒ Boolean
-
#initialize(failure) ⇒ RSpecFailure
constructor
A new instance of RSpecFailure.
- #location ⇒ Object
- #message ⇒ Object
- #name ⇒ Object
Constructor Details
#initialize(failure) ⇒ RSpecFailure
Returns a new instance of RSpecFailure.
24 25 26 |
# File 'lib/ci/reporter/rspec.rb', line 24 def initialize(failure) @failure = failure end |
Instance Method Details
#error? ⇒ Boolean
32 33 34 |
# File 'lib/ci/reporter/rspec.rb', line 32 def error? !@failure.expectation_not_met? end |
#failure? ⇒ Boolean
28 29 30 |
# File 'lib/ci/reporter/rspec.rb', line 28 def failure? @failure.expectation_not_met? end |
#location ⇒ Object
38 |
# File 'lib/ci/reporter/rspec.rb', line 38 def location() @failure.exception.backtrace.join("\n") end |
#message ⇒ Object
37 |
# File 'lib/ci/reporter/rspec.rb', line 37 def () @failure.exception. end |
#name ⇒ Object
36 |
# File 'lib/ci/reporter/rspec.rb', line 36 def name() @failure.exception.class.name end |