Sha256: 9e13d848558970e4bb26d2440a32cef93116a753afb8c7395dc1db9f37375ae7

Contents?: true

Size: 696 Bytes

Versions: 1

Compression:

Stored size: 696 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/hash/normalize_keys.rb
#
# Extracted Fri Sep 08 20:20:32 EDT 2006
# Unit Tools Reap Test Extractor
#

require 'facets/core/hash/normalize_keys.rb'


  require 'test/unit'

  class TestHash < Test::Unit::TestCase

    def test_01
      foo = { :a=>1, :b=>2 }
      assert_equal( { "a"=>1, "b"=>2 }, foo.normalize_keys{|k|k.to_s} )
      assert_equal( { :a =>1, :b=>2 }, foo  )
    end

    def test_02
      foo = { :a=>1, :b=>2 }
      assert_equal( { "a"=>1, "b"=>2 }, foo.normalize_keys!{|k|k.to_s}  )
      assert_equal( { "a"=>1, "b"=>2 }, foo )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.7.46 test/lib/facets/core/hash/test_normalize_keys.rb