Sha256: dbcbbc8a489191b75cbed3ba3c353c104252d0f1a02871df1ed97659931e8b63

Contents?: true

Size: 485 Bytes

Versions: 16

Compression:

Stored size: 485 Bytes

Contents

# Test facets/hash/stringify_keys.rb

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

class TestHashStringifyKeys < Test::Unit::TestCase

  def test_stringify_keys
    foo = { :a=>1, :b=>2 }
    assert_equal( { "a"=>1, "b"=>2 }, foo.stringify_keys )
    assert_equal( { :a =>1, :b=>2 }, foo  )
  end

  def test_stringify_keys!
    foo = { :a=>1, :b=>2 }
    assert_equal( { "a"=>1, "b"=>2 }, foo.stringify_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_stringify_keys.rb
facets-2.8.3 test/core/hash/test_stringify_keys.rb
facets-2.8.2 test/core/hash/test_stringify_keys.rb
facets-2.8.1 test/core/hash/test_stringify_keys.rb
facets-2.8.0 test/core/hash/test_stringify_keys.rb
facets-2.7.0 test/core/hash/test_stringify_keys.rb
facets-2.6.0 test/core/hash/test_stringify_keys.rb
facets-2.4.0 test/hash/test_stringify_keys.rb
facets-2.4.1 test/hash/test_stringify_keys.rb
facets-2.4.2 test/core/hash/test_stringify_keys.rb
facets-2.4.3 test/core/hash/test_stringify_keys.rb
facets-2.4.4 test/core/hash/test_stringify_keys.rb
facets-2.5.1 test/core/hash/test_stringify_keys.rb
facets-2.5.0 test/core/hash/test_stringify_keys.rb
facets-2.4.5 test/core/hash/test_stringify_keys.rb
facets-2.5.2 test/core/hash/test_stringify_keys.rb