Parent

Methods

Class/Module Index [+]

Quicksearch

Spec::Runner::Reporter::Failure

Attributes

exception[R]

The Exception object raised

Public Instance Methods

header() click to toggle source

Header messsage for reporting this failure, including the name of the example and an indicator of the type of failure. FAILED indicates a failed expectation. FIXED indicates a pending example that passes, and no longer needs to be pending. RuntimeError indicates that a RuntimeError occured.

Examples

'A new account should have a zero balance' FAILED
'A new account should have a zero balance' FIXED
RuntimeError in 'A new account should have a zero balance'
# File lib/spec/runner/reporter.rb, line 89
def header
  if expectation_not_met?
    "'#{@example_name}' FAILED"
  elsif pending_fixed?
    "'#{@example_name}' FIXED"
  else
    "#{@exception.class.name} in '#{@example_name}'"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.