Sha256: ce9d2f153e069c3deda96a916aa3ff39d27558ce86053a1edbe6875e08aa0fd0

Contents?: true

Size: 530 Bytes

Versions: 340

Compression:

Stored size: 530 Bytes

Contents

require 'spec_helper'
require 'puppet/pops'

module Puppet::Pops
describe 'MergeStrategy' do
  context 'deep merge' do
    it 'does not mutate the source of a merge' do
      a = { 'a' => { 'b' => 'va' }, 'c' => 2 }
      b = { 'a' => { 'b' => 'vb' }, 'b' => 3}
      c = MergeStrategy.strategy(:deep).merge(a, b);
      expect(a).to eql({ 'a' => { 'b' => 'va' }, 'c' => 2 })
      expect(b).to eql({ 'a' => { 'b' => 'vb' }, 'b' => 3 })
      expect(c).to eql({ 'a' => { 'b' => 'va' }, 'b' => 3, 'c' => 2 })
    end
  end
end
end

Version data entries

340 entries across 340 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.0-x86-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.0-x64-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.0-universal-darwin spec/unit/pops/merge_strategy_spec.rb
puppet-8.4.0 spec/unit/pops/merge_strategy_spec.rb
puppet-8.4.0-x86-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.4.0-x64-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.4.0-universal-darwin spec/unit/pops/merge_strategy_spec.rb
puppet-7.28.0 spec/unit/pops/merge_strategy_spec.rb
puppet-7.28.0-x86-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-7.28.0-x64-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-7.28.0-universal-darwin spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.1 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.1-x86-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.1-x64-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-8.3.1-universal-darwin spec/unit/pops/merge_strategy_spec.rb
puppet-7.27.0 spec/unit/pops/merge_strategy_spec.rb
puppet-7.27.0-x86-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-7.27.0-x64-mingw32 spec/unit/pops/merge_strategy_spec.rb
puppet-7.27.0-universal-darwin spec/unit/pops/merge_strategy_spec.rb