Sha256: 8d28dc328f763d057f55dc993f94316fdfaab027b8ae53b859cb9494f365944b

Contents?: true

Size: 686 Bytes

Versions: 1

Compression:

Stored size: 686 Bytes

Contents

#  _____         _
# |_   _|__  ___| |_
#   | |/ _ \/ __| __|
#   | |  __/\__ \ |_
#   |_|\___||___/\__|
#
# for lib/facets/core/hash/symbolize_keys.rb
#
# Extracted Fri Feb 16 02:00:36 EST 2007
# Project.rb Test Extraction
#

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


  require 'test/unit'

  class TCHash < Test::Unit::TestCase

    def test_keys_to_sym
      foo = { 'a'=>1, 'b'=>2 }
      assert_equal( { :a=>1, :b=>2 }, foo.symbolize_keys )
      assert_equal( { "a" =>1, "b"=>2 }, foo )
    end

    def test_keys_to_sym!
      foo = { 'a'=>1, 'b'=>2 }
      assert_equal( { :a=>1, :b=>2 }, foo.symbolize_keys! )
      assert_equal( { :a=>1, :b=>2 }, foo  )
    end

  end


Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
facets-1.8.49 test/lib/facets/core/hash/test_symbolize_keys.rb