Sha256: baa6cc1cc3d6e4e038245eaf005c68c2e491b19fb25ed1d50f8c21931bc6e309

Contents?: true

Size: 523 Bytes

Versions: 16

Compression:

Stored size: 523 Bytes

Contents

require 'with_deep_merge'

class WithDeepMergeTest < Minitest::Test
  include WithDeepMerge

  def test_simple_merge
    base_hash = { "a" => "b" }
    other_hash = { "c" => "d" }
    assert_equal({ "a" => "b", "c" => "d" }, deep_merge(base_hash, other_hash))
  end

  def test_recursive_merge
    base_hash = { "a" =>  { "b" => "c", "d" => "e" } }
    other_hash = { "a" => { "b" => "z", "f" => "g" } }
    assert_equal({ "a" => { "b" => "z", "d" => "e", "f" => "g" } },
      deep_merge(base_hash, other_hash))
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
govspeak-5.5.0 test/with_deep_merge_test.rb
govspeak-5.4.0 test/with_deep_merge_test.rb
govspeak-5.3.0 test/with_deep_merge_test.rb
govspeak-5.2.2 test/with_deep_merge_test.rb
govspeak-5.2.1 test/with_deep_merge_test.rb
govspeak-5.2.0 test/with_deep_merge_test.rb
govspeak-5.1.0 test/with_deep_merge_test.rb
govspeak-5.0.3 test/with_deep_merge_test.rb
govspeak-5.0.2 test/with_deep_merge_test.rb
govspeak-5.0.1 test/with_deep_merge_test.rb
govspeak-5.0.0 test/with_deep_merge_test.rb
govspeak-4.0.0 test/with_deep_merge_test.rb
govspeak-3.6.2 test/with_deep_merge_test.rb
govspeak-3.6.1 test/with_deep_merge_test.rb
govspeak-3.6.0 test/with_deep_merge_test.rb
govspeak-3.5.2 test/with_deep_merge_test.rb