Class: Spec::Runner::Reporter::Failure
- Defined in:
- lib/spec/runner/reporter.rb
Instance Attribute Summary collapse
-
#example ⇒ Object
readonly
Returns the value of attribute example.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
- #expectation_not_met? ⇒ Boolean
- #header ⇒ Object
-
#initialize(group, example, exception) ⇒ Failure
constructor
A new instance of Failure.
- #pending_fixed? ⇒ Boolean
Constructor Details
permalink #initialize(group, example, exception) ⇒ Failure
Returns a new instance of Failure.
136 137 138 |
# File 'lib/spec/runner/reporter.rb', line 136 def initialize(group, example, exception) @group, @example, @exception = group, example, exception end |
Instance Attribute Details
Instance Method Details
permalink #expectation_not_met? ⇒ Boolean
154 155 156 |
# File 'lib/spec/runner/reporter.rb', line 154 def expectation_not_met? @exception.is_a?(Spec::Expectations::ExpectationNotMetError) end |
permalink #header ⇒ Object
[View source]
140 141 142 143 144 145 146 147 148 |
# File 'lib/spec/runner/reporter.rb', line 140 def header if expectation_not_met? "'#{example_name}' FAILED" elsif pending_fixed? "'#{example_name}' FIXED" else "#{@exception.class.name} in '#{example_name}'" end end |
permalink #pending_fixed? ⇒ Boolean
150 151 152 |
# File 'lib/spec/runner/reporter.rb', line 150 def pending_fixed? @exception.is_a?(Spec::Example::PendingExampleFixedError) end |