Sha256: 197609871fd8b6461bd296679a0c813f1e2db7c166bfd70a82e8df31eabe06b9

Contents?: true

Size: 333 Bytes

Versions: 16

Compression:

Stored size: 333 Bytes

Contents

# encoding: UTF-8

describe Hash do

  describe '#deep_dup' do
    it 'should crete a deep copy' do
      x = {
        :a => {
          :b => :c
        }
      }
      y = x.dup
      deep_y = x.deep_dup

      y[:a].object_id.should === x[:a].object_id
      deep_y[:a].object_id.should_not === x[:a].object_id
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
gooddata-0.6.19 spec/unit/extensions/hash_spec.rb
gooddata-0.6.18 spec/unit/extensions/hash_spec.rb
gooddata-0.6.17 spec/unit/extensions/hash_spec.rb
gooddata-0.6.16 spec/unit/extensions/hash_spec.rb
gooddata-0.6.15 spec/unit/extensions/hash_spec.rb
gooddata-0.6.14 spec/unit/extensions/hash_spec.rb
gooddata-0.6.13 spec/unit/extensions/hash_spec.rb
gooddata-0.6.12 spec/unit/extensions/hash_spec.rb
gooddata-0.6.11 spec/unit/extensions/hash_spec.rb
gooddata-0.6.10 spec/unit/extensions/hash_spec.rb
gooddata-0.6.9 spec/unit/extensions/hash_spec.rb
gooddata-0.6.8 spec/unit/extensions/hash_spec.rb
gooddata-0.6.7 spec/unit/extensions/hash_spec.rb
gooddata-0.6.6 spec/unit/extensions/hash_spec.rb
gooddata-0.6.5 spec/unit/extensions/hash_spec.rb
gooddata-0.6.4 spec/unit/extensions/hash_spec.rb