123456789_123456789_123456789_123456789_123456789_

Exception: Test::Unit::AssertionFailedError

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, StandardError
Instance Chain:
self, StandardError
Inherits: StandardError
  • Object
Defined in: lib/test/unit/assertion-failed-error.rb

Overview

Thrown by Assertions when an assertion fails.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(message = nil, options = nil) ⇒ AssertionFailedError

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 14

def initialize(message=nil, options=nil)
  options ||= {}
  @expected = options[:expected]
  @actual = options[:actual]
  @inspected_expected = options[:inspected_expected]
  @inspected_actual = options[:inspected_actual]
  @user_message = options[:user_message]
  super(message)
end

Instance Attribute Details

#actual (rw)

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 12

attr_accessor :expected, :actual, :user_message

#expected (rw)

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 12

attr_accessor :expected, :actual, :user_message

#inspected_actual (rw)

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 13

attr_accessor :inspected_expected, :inspected_actual

#inspected_expected (rw)

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 13

attr_accessor :inspected_expected, :inspected_actual

#user_message (rw)

[ GitHub ]

  
# File 'lib/test/unit/assertion-failed-error.rb', line 12

attr_accessor :expected, :actual, :user_message