Sha256: 1b06db139c02a80ad85c6befbc31f94bfa663b8c83528028b305e8a72fb2aaa3
Contents?: true
Size: 515 Bytes
Versions: 65
Compression:
Stored size: 515 Bytes
Contents
require "spec_helper" describe SC::HashStruct, 'deep_clone' do it "should deep_clone any objects that respond to deep_clone" do a = SC::HashStruct.new a[:b] = SC::HashStruct.new :c => :d e = a.deep_clone e[:b][:c] = :f e[:b][:c].should eql(:f) a[:b][:c].should eql(:d) end it "should clone any objects that respond to clone" do a = SC::HashStruct.new a[:b] = [1,2,3] b = a.deep_clone b[:b][0] = 4 a[:b][0].should eql(1) b[:b][0].should eql(4) end end
Version data entries
65 entries across 65 versions & 1 rubygems