Sha256: 26ac8ee35dd6d56cb91973558c267db2fe77925d5620a0e6ff74fe84b7760d1a

Contents?: true

Size: 437 Bytes

Versions: 3

Compression:

Stored size: 437 Bytes

Contents

require File.dirname(__FILE__) + '/../lib/netzke/core_ext'

describe "Core extensions" do
  it "should properly do deep_each_pair" do
    res = {}
    {
      :one => 1, 
      :two => {:three => 3}, 
      :nine => [
        {:four => 4, :five => {:six => 6}}, 
        {:seven => [{:eight => 8}]}
      ]
    }.deep_each_pair{ |k,v| res[k] = v }
    res.should == {:one => 1, :three => 3, :four => 4, :six => 6, :eight => 8}
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
netzke-core-0.6.2 spec/core_ext_spec.rb
netzke-core-0.6.1 spec/core_ext_spec.rb
netzke-core-0.6.0 spec/core_ext_spec.rb