class Test::Unit::Failure

when an assertion fails.
Encapsulates a test failure. Created by Test::Unit::TestCase

def compute_diff

def compute_diff
  Assertions::AssertionMessage.delayed_diff(@expected, @actual).inspect
end

def critical?

def critical?
  true
end

def diff

def diff
  @diff ||= compute_diff
end

def initialize(test_name, location, message, options={})

message.
Creates a new Failure with the given location and
def initialize(test_name, location, message, options={})
  @test_name = test_name
  @location = location
  @message = message
  @method_name = options[:method_name]
  @source_location = options[:source_location]
  @expected = options[:expected]
  @actual = options[:actual]
  @inspected_expected = options[:inspected_expected]
  @inspected_actual = options[:inspected_actual]
  @user_message = options[:user_message]
end

def label

def label
  LABEL
end

def long_display

Returns a verbose version of the error description.
def long_display
  if location.size == 1
    location_display = location[0].sub(/\A(.+:\d+).*/, ' [\\1]')
  else
    location_display = "\n    [#{location.join("\n     ")}]"
  end
  "#{label}:\n#@test_name#{location_display}:\n#@message"
end

def short_display

Returns a brief version of the error description.
def short_display
  "#@test_name: #{@message.split("\n")[0]}"
end

def single_character_display

Returns a single character representation of a failure.
def single_character_display
  SINGLE_CHARACTER
end

def to_s

Overridden to return long_display.
def to_s
  long_display
end