Method: MiniTest::Assertions#assert_same

Defined in:
lib/minitest/unit.rb

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

Fails unless exp and act are #equal?

[View source]

262
263
264
265
266
267
268
# File 'lib/minitest/unit.rb', line 262

def assert_same exp, act, msg = nil
  msg = message(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