Exception: Test::Unit::AssertionFailedError
- Inherits:
-
StandardError
- Object
- StandardError
- Test::Unit::AssertionFailedError
- Defined in:
- lib/test/unit/assertion-failed-error.rb
Overview
Thrown by Test::Unit::Assertions when an assertion fails.
Instance Attribute Summary collapse
-
#actual ⇒ Object
Returns the value of attribute actual.
-
#expected ⇒ Object
Returns the value of attribute expected.
-
#inspected_actual ⇒ Object
Returns the value of attribute inspected_actual.
-
#inspected_expected ⇒ Object
Returns the value of attribute inspected_expected.
-
#user_message ⇒ Object
Returns the value of attribute user_message.
Instance Method Summary collapse
-
#initialize(message = nil, options = nil) ⇒ AssertionFailedError
constructor
A new instance of AssertionFailedError.
Constructor Details
#initialize(message = nil, options = nil) ⇒ AssertionFailedError
Returns a new instance of AssertionFailedError.
14 15 16 17 18 19 20 21 22 |
# File 'lib/test/unit/assertion-failed-error.rb', line 14 def initialize(=nil, =nil) ||= {} @expected = [:expected] @actual = [:actual] @inspected_expected = [:inspected_expected] @inspected_actual = [:inspected_actual] @user_message = [:user_message] super() end |
Instance Attribute Details
#actual ⇒ Object
Returns the value of attribute actual.
12 13 14 |
# File 'lib/test/unit/assertion-failed-error.rb', line 12 def actual @actual end |
#expected ⇒ Object
Returns the value of attribute expected.
12 13 14 |
# File 'lib/test/unit/assertion-failed-error.rb', line 12 def expected @expected end |
#inspected_actual ⇒ Object
Returns the value of attribute inspected_actual.
13 14 15 |
# File 'lib/test/unit/assertion-failed-error.rb', line 13 def inspected_actual @inspected_actual end |
#inspected_expected ⇒ Object
Returns the value of attribute inspected_expected.
13 14 15 |
# File 'lib/test/unit/assertion-failed-error.rb', line 13 def inspected_expected @inspected_expected end |
#user_message ⇒ Object
Returns the value of attribute user_message.
12 13 14 |
# File 'lib/test/unit/assertion-failed-error.rb', line 12 def @user_message end |