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
cloudsmith-api-2.0.16 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.15 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.14 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.13 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.12 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.11 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.10 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.9 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.8 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.7 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.6 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.5 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.4 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.3 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.2 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.1 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-2.0.0 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-1.142.3 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-1.120.3 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb
cloudsmith-api-1.61.3 vendor/bundle/ruby/2.6.0/gems/webmock-1.24.6/spec/unit/util/hash_keys_stringifier_spec.rb