Skip to content

Instantly share code, notes, and snippets.

@aarongough
Created May 20, 2010 03:21
Show Gist options
  • Save aarongough/407152 to your computer and use it in GitHub Desktop.
Save aarongough/407152 to your computer and use it in GitHub Desktop.
require 'test/unit'
class SanityTest < Test::Unit::TestCase
def test_my_sanity
complex_array = [{:blah => "hello"},{:foo => "blah"}]
copied_array = complex_array.clone
copied_array[0][:blah] = nil
assert_not_equal copied_array, complex_array
end
end
# 1) Failure:
# test_my_sanity(SanityTest):
# <[{:blah=>nil}, {:foo=>"blah"}]> expected to be != to
# <[{:blah=>nil}, {:foo=>"blah"}]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment