Sha256: 8a3bfc1cfd4daf65aa6beb554ba519695536a91f8742a70c40d4ccda566030cf
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
require 'with_deep_merge' class WithDeepMergeTest < Test::Unit::TestCase 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
10 entries across 10 versions & 1 rubygems