Method: Minitest::Assertions#assert_same
- Defined in:
- lib/minitest/assertions.rb
#assert_same(exp, act, msg = nil) ⇒ Object
Fails unless exp and act are #equal?
327 328 329 330 331 332 333 |
# File 'lib/minitest/assertions.rb', line 327 def assert_same exp, act, msg = nil msg = (msg) { data = [mu_pp(act), act.object_id, mu_pp(exp), exp.object_id] "Expected %s (oid=%d) to be the same as %s (oid=%d)" % data } assert exp.equal?(act), msg end |