method
example_failed
1.1.12 -
Show latest stable
- Class:
Spec::Runner::Formatter::NestedTextFormatter
example_failed(example, counter, failure)public
No documentation available.
# File lib/spec/runner/formatter/nested_text_formatter.rb, line 26
def example_failed(example, counter, failure)
message = if failure.expectation_not_met?
"#{current_indentation}#{example.description} (FAILED - #{counter})"
else
"#{current_indentation}#{example.description} (ERROR - #{counter})"
end
output.puts(failure.expectation_not_met? ? red(message) : magenta(message))
output.flush
end