Method: Minitest::Assertions#assert_equal

Defined in:
lib/minitest/assertions.rb

#assert_equal(exp, act, msg = nil) ⇒ Object

Fails unless exp == act printing the difference between the two, if possible.

If there is no visible difference but the assertion fails, you should suspect that your #== is buggy, or your inspect output is missing crucial details.

For floats use assert_in_delta.

See also: Minitest::Assertions.diff



155
156
157
158
# File 'lib/minitest/assertions.rb', line 155

def assert_equal exp, act, msg = nil
  msg = message(msg, "") { diff exp, act }
  assert exp == act, msg
end