Sha256: 2b2c8096c649b0a6c9f7a425ef1f9ff140b37678b21acd0b055d2e17a2231c38

Contents?: true

Size: 564 Bytes

Versions: 13

Compression:

Stored size: 564 Bytes

Contents

# encoding: UTF-8
#
# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

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

      expect(y[:a].object_id).to be == x[:a].object_id
      expect(deep_y[:a].object_id).not_to be == x[:a].object_id
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gooddata-1.1.0-java spec/unit/extensions/hash_spec.rb
gooddata-1.1.0 spec/unit/extensions/hash_spec.rb
gooddata-1.0.2-java spec/unit/extensions/hash_spec.rb
gooddata-1.0.2 spec/unit/extensions/hash_spec.rb
gooddata-1.0.1 spec/unit/extensions/hash_spec.rb
gooddata-1.0.1-java spec/unit/extensions/hash_spec.rb
gooddata-1.0.0-java spec/unit/extensions/hash_spec.rb
gooddata-1.0.0 spec/unit/extensions/hash_spec.rb
gooddata-0.6.54 spec/unit/extensions/hash_spec.rb
gooddata-0.6.53 spec/unit/extensions/hash_spec.rb
gooddata-0.6.52 spec/unit/extensions/hash_spec.rb
gooddata-0.6.51 spec/unit/extensions/hash_spec.rb
gooddata-0.6.50 spec/unit/extensions/hash_spec.rb