Sha256: 0a3ba923e64642f5c6481f1317c0684d91ae883097c82f5ebfaa07d15cb89ecb

Contents?: true

Size: 332 Bytes

Versions: 6

Compression:

Stored size: 332 Bytes

Contents

require 'test_helper'

class CoreExtTest < Test::Unit::TestCase
  test 'deep_symbolize_keys walks arrays, too' do
    hash     = { 'foo' => [{ 'bar' => 'bar', 'baz' => { 'buz' => 'buz' } }] }
    expected = { :foo  => [{ :bar  => 'bar', :baz  => { :buz  => 'buz' } }] }
    assert_equal expected, hash.deep_symbolize_keys
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hashr-0.0.19 test/core_ext_test.rb
hashr-0.0.18 test/core_ext_test.rb
hashr-0.0.17 test/core_ext_test.rb
hashr-0.0.16 test/core_ext_test.rb
hashr-0.0.15 test/core_ext_test.rb
hashr-0.0.14 test/core_ext_test.rb