Sha256: b4ad41324d298d552357d5967b25e66ebbecb423ae2f7e9e7f21ab8d7200db7e

Contents?: true

Size: 297 Bytes

Versions: 2

Compression:

Stored size: 297 Bytes

Contents

# Test for lib/facets/hash/iterate

require 'facets/hash/each_with_key.rb'

require 'test/unit'

class TestHashIterate < Test::Unit::TestCase

  def test_each_with_key
    h1 = { :a=>1, :b=>2 }
    h2 = {}
    h1.each_with_key { |v,k| h2[v] = k }
    assert_equal( {1=>:a, 2=>:b}, h2 )
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
facets-2.3.0 test/core/hash/test_each_with_key.rb
facets-2.2.1 test/unit/hash/test_each_with_key.rb