Sha256: 5d23ed79b8cb72d8f9281d837d48f74d4a821f64b519f8d3fd09f52b49035548

Contents?: true

Size: 483 Bytes

Versions: 16

Compression:

Stored size: 483 Bytes

Contents

# Test for facets/hash/symbolize_keys.rb

require 'facets/hash/symbolize_keys.rb'
require 'test/unit'

class TestSymbolizeKeys < Test::Unit::TestCase

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

  def test_symbolize_keys!
    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

16 entries across 16 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/hash/test_symbolize_keys.rb
facets-2.8.3 test/core/hash/test_symbolize_keys.rb
facets-2.8.2 test/core/hash/test_symbolize_keys.rb
facets-2.8.1 test/core/hash/test_symbolize_keys.rb
facets-2.8.0 test/core/hash/test_symbolize_keys.rb
facets-2.7.0 test/core/hash/test_symbolize_keys.rb
facets-2.6.0 test/core/hash/test_symbolize_keys.rb
facets-2.4.0 test/hash/test_symbolize_keys.rb
facets-2.4.1 test/hash/test_symbolize_keys.rb
facets-2.4.3 test/core/hash/test_symbolize_keys.rb
facets-2.4.4 test/core/hash/test_symbolize_keys.rb
facets-2.4.2 test/core/hash/test_symbolize_keys.rb
facets-2.4.5 test/core/hash/test_symbolize_keys.rb
facets-2.5.0 test/core/hash/test_symbolize_keys.rb
facets-2.5.1 test/core/hash/test_symbolize_keys.rb
facets-2.5.2 test/core/hash/test_symbolize_keys.rb