Sha256: 46d979553d62095575dcec1bc76b377dfbd6fae0f420b54dbceca533dcef9397

Contents?: true

Size: 378 Bytes

Versions: 11

Compression:

Stored size: 378 Bytes

Contents

require 'spec_helper'

describe Hash do

  it 'should extract all nested keys' do
    { :a => { :b => { :c => :d, :e => :f }}}.nested_keys.should =~ [:a, :b, :c, :e]
  end

  it 'should deep push merge' do
    h = { :a => { :b => [1, 2] }, :c => :d }
    h.deep_push_merge!({ :a => { :b => [3, 4] }, :c => :e })
    h.should == { :a => { :b => [1,2,3,4] }, :c => :e }
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bootstripe-0.2.23 spec/hash_additions_spec.rb
bootstripe-0.2.22 spec/hash_additions_spec.rb
bootstripe-0.2.20 spec/hash_additions_spec.rb
bootstripe-0.2.19 spec/hash_additions_spec.rb
bootstripe-0.2.18 spec/hash_additions_spec.rb
bootstripe-0.2.17 spec/hash_additions_spec.rb
bootstripe-0.2.16 spec/hash_additions_spec.rb
bootstripe-0.2.15 spec/hash_additions_spec.rb
bootstripe-0.2.14 spec/hash_additions_spec.rb
bootstripe-0.2.13 spec/hash_additions_spec.rb
bootstripe-0.2.12 spec/hash_additions_spec.rb