Sha256: 314ba8d0e230d18d846a2ef264a42a09573ded3b005a43533a93f8d7a6bef64e
Contents?: true
Size: 736 Bytes
Versions: 1
Compression:
Stored size: 736 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/hash/traverse.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/core/hash/traverse.rb' require 'test/unit' class TCHash < Test::Unit::TestCase def test_traverse h = { "A" => "x", "B" => "y" } h2 = h.traverse { |k,v| [k.downcase, v.upcase] } e = { "a" => "X", "b" => "Y" } assert_not_equal( h, h2 ) assert_equal( e, h2 ) end def test_traverse! h = { "A" => "x", "B" => "y" } h.traverse! { |k,v| [k.downcase, v.upcase] } e = { "a" => "X", "b" => "Y" } assert_equal( e, h ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/core/hash/test_traverse.rb |