Sha256: 47cb989ff536dd1b176c577666871579d4632d6ea76737c7ab8ebbc30765090c

Contents?: true

Size: 482 Bytes

Versions: 105

Compression:

Stored size: 482 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

105 entries across 99 versions & 8 rubygems

Version Path
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/webmock-3.18.1/spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.18.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.18.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.15.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.16.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.16.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.15.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.17.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.17.0 spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/webmock-3.13.0/spec/unit/util/hash_keys_stringifier_spec.rb
webmock-3.14.0 spec/unit/util/hash_keys_stringifier_spec.rb