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.
9 10 11 |
# File 'lib/ci/reporter/rspec.rb', line 9 def initialize(failure) @failure = failure end |
Instance Method Details
#error? ⇒ Boolean
17 18 19 |
# File 'lib/ci/reporter/rspec.rb', line 17 def error? !@failure.expectation_not_met? end |
#failure? ⇒ Boolean
13 14 15 |
# File 'lib/ci/reporter/rspec.rb', line 13 def failure? @failure.expectation_not_met? end |
#location ⇒ Object
23 |
# File 'lib/ci/reporter/rspec.rb', line 23 def location() @failure.exception.backtrace.join("\n") end |
#message ⇒ Object
22 |
# File 'lib/ci/reporter/rspec.rb', line 22 def () @failure.exception. end |
#name ⇒ Object
21 |
# File 'lib/ci/reporter/rspec.rb', line 21 def name() @failure.exception.class.name end |