Sha256: f1b5681664db88552ec667415f0125d5b0732218692f910ee29994304ca4c42f

Contents?: true

Size: 477 Bytes

Versions: 47

Compression:

Stored size: 477 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"}]
          }
        ]
      }
    }
    WebMock::Util::HashKeysStringifier.stringify_keys!(hash).should == stringified
  end

end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/webmock-1.8.11/spec/unit/util/hash_keys_stringifier_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/webmock-1.8.11/spec/unit/util/hash_keys_stringifier_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/webmock-1.8.11/spec/unit/util/hash_keys_stringifier_spec.rb
whos_dated_who-0.1.0 vendor/bundle/gems/webmock-1.18.0/spec/unit/util/hash_keys_stringifier_spec.rb
whos_dated_who-0.0.1 vendor/bundle/gems/webmock-1.18.0/spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.18.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.17.4 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.17.3 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.17.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.17.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.17.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.16.1 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.16.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.15.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.15.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.14.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.13.0 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.12.3 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.12.2 spec/unit/util/hash_keys_stringifier_spec.rb
webmock-1.12.1 spec/unit/util/hash_keys_stringifier_spec.rb