method
assert_equal
v1_8_7_330 -
Show latest stable
- Class:
Test::Unit::Assertions
assert_equal(expected, actual, message=nil)public
Passes if expected == +actual.
Note that the ordering of arguments is important, since a helpful error message is generated when this one fails that tells you the values of expected and actual.
Example:
assert_equal 'MY STRING', 'my string'.upcase
1Note
Not for floats
You should use assert_in_delta when comparing floating-point numbers.