Sha256: 0cb7e83da39dd058221a2cfc23354e5cb577d0d26e8300eb7393e7b824776c48

Contents?: true

Size: 497 Bytes

Versions: 91

Compression:

Stored size: 497 Bytes

Contents

require '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"}]
          }
        ]
      }
    }
    expect(WebMock::Util::HashKeysStringifier.stringify_keys!(hash, :deep => true)).to eq(stringified)
  end

end

Version data entries

91 entries across 89 versions & 8 rubygems

Version Path
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.3 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.0.beta2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.6 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.5 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.4 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-2.0.0.beta1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.3 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.24.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.23.0 spec/unit/util/hash_keys_stringifier_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/webmock-1.20.4/spec/unit/util/hash_keys_stringifier_spec.rb