Sha256: 69b322c372d244fa4c4997eb323e21781150ef58379b09f0c8a24c4ef9d3fbb6

Contents?: true

Size: 524 Bytes

Versions: 11

Compression:

Stored size: 524 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe WebMock::Util::HashKeysStringifier do

  it "should recursively stringify all symbol keys" do
    hash = {
      :a => {
        :b => [
          {
            :c => [{:d => "1"}]
          }
        ]
      }
    }
    stringified = {
      'a' => {
        'b' => [
          {
            'c' => [{'d' => "1"}]
          }
        ]
      }
    }
    WebMock::Util::HashKeysStringifier.stringify_keys!(hash).should == stringified
  end

end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/webmock-1.6.4/spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.5 spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.4 spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.3 spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.2 spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.1 spec/util/hash_keys_stringifier_spec.rb
webmock-1.7.0 spec/util/hash_keys_stringifier_spec.rb
webmock-1.6.4 spec/util/hash_keys_stringifier_spec.rb
webmock-1.6.2 spec/util/hash_keys_stringifier_spec.rb
webmock-1.6.1 spec/util/hash_keys_stringifier_spec.rb
webmock-1.6.0 spec/util/hash_keys_stringifier_spec.rb