Skip to content

Instantly share code, notes, and snippets.

@bsdlp
Created July 30, 2014 17:25
Show Gist options
  • Save bsdlp/beb32320e69e85533d25 to your computer and use it in GitHub Desktop.
Save bsdlp/beb32320e69e85533d25 to your computer and use it in GitHub Desktop.
jchen@hobbes> irb
irb(main):001:0> require 'test/unit'
=> true
irb(main):002:0> extend Test::Unit::Assertions
=> main
irb(main):003:0> heh = '1234'
=> "1234"
irb(main):004:0> bleh = '1234'
=> "1234"
irb(main):005:0> assert_equal heh, bleh
=> true
irb(main):006:0> assert_equal heh.object_id, bleh.object_id
MiniTest::Assertion: <70114959426640> expected but was
<70114951712340>.
from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/minitest/unit.rb:202:in `assert'
from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/test/unit/assertions.rb:36:in `assert'
from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/test/unit/assertions.rb:250:in `assert_equal'
from (irb):6
from /usr/local/var/rbenv/versions/2.1.2/bin/irb:11:in `<main>'
irb(main):007:0> heh.object_id
=> 70114959426640
irb(main):008:0> bleh.object_id
=> 70114951712340
irb(main):009:0> quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment