Sha256: 10240bd2dd56705aa3b6a067e9f93098cf1fa0ea2a86f891c1fe056fcdf3f1bb
Contents?: true
Size: 637 Bytes
Versions: 1
Compression:
Stored size: 637 Bytes
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/core/hash/each.rb # # Extracted Tue Jul 25 10:07:15 EDT 2006 # Unit Tools Reap Test Extractor # require 'facets/core/hash/each.rb' require 'test/unit' class TCHash < Test::Unit::TestCase def test_each_1 h = { :a=>1, :b=>2, :c=>3 } a = [] h.each { |v| a << v } assert_equal( [1,2,3], a.sort ) end def test_each_2 h = { 'a'=>1, 'b'=>2, 'c'=>3 } a = [] h.each { |k,v| a << [k,v] } assert_equal( [['a',1],['b',2],['c',3]], a.sort ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.7.0 | test/lib/facets/core/hash/test_each.rb |