# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/hash/alias.rb # # Extracted Mon Jul 03 00:56:56 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/hash/alias.rb' require 'test/unit' class TCHash < Test::Unit::TestCase def test_alias! foo = { 'a'=>1, 'b'=>2 } assert_equal( { 'a'=>1, 'b'=>2, 'c'=>2 }, foo.alias!('c','b') ) foo = { 'a'=>1, 'b'=>2 } assert_equal( { :a=>1, 'a'=>1, 'b'=>2 }, foo.alias!(:a,'a') ) foo = { :a=>1, :b=>2 } assert_equal( { :a=>1, :b=>2 }, foo.alias!('bar','foo') ) end end