Sha256: e814b74e8a6e570b0052ca41a97c76205722f970a1de851ec508b33dd77cef21
Contents?: true
Size: 661 Bytes
Versions: 23
Compression:
Stored size: 661 Bytes
Contents
require 'spec_helper' describe "#constructive_merge" do it "merges hashes without clobbering" do x = {'reviews' => {'user' => {}}} y = {'reviews' => {'ratings' => {}}} x.extend TablePrint::HashExtensions::ConstructiveMerge x.constructive_merge(y).should == {'reviews' => {'user' => {}, 'ratings' => {}}} end end describe "#constructive_merge!" do it "merges hashes in place without clobbering" do x = {'reviews' => {'user' => {}}} y = {'reviews' => {'ratings' => {}}} x.extend TablePrint::HashExtensions::ConstructiveMerge x.constructive_merge!(y) x.should == {'reviews' => {'user' => {}, 'ratings' => {}}} end end
Version data entries
23 entries across 23 versions & 1 rubygems