Sha256: 21b9f46a2378cac7a26f8662260d87e8221575068a1f07fc51eb768e4c7aba79

Contents?: true

Size: 637 Bytes

Versions: 1

Compression:

Stored size: 637 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/hash/each.rb
#
# Extracted Wed Jul 05 11:47:50 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.4.5 test/lib/facets/core/hash/test_each.rb