Sha256: 0f778073b0e74c92dd02974fdab34bbbb2d90ba9891a8564f2f8ad1c100ce6d0

Contents?: true

Size: 314 Bytes

Versions: 2

Compression:

Stored size: 314 Bytes

Contents

require 'spec_helper'

describe Hash do
  describe "#symbolize_keys_deep!" do
    it "symbolizes recusively" do
      hash = { "a" => 1, "b" => { "c" => 2, "d" => 3 } }
      hash.symbolize_keys_deep!
      expect(hash.fetch(:a)).to eq(1)
      expect(hash.fetch(:b)).to eq({ :c => 2, :d => 3 })
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fucking_shell_scripts-1.1 spec/core_ext/hash_spec.rb
fucking_shell_scripts-1.0 spec/core_ext/hash_spec.rb