PageRenderTime 42ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/hash/test_merge.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | c689074d1309a5748fb13b9f3d3c9ba1 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/hash/merge'
  2. require 'test/unit'
  3. class TC_Hash_Merge < Test::Unit::TestCase
  4. def test_reverse_merge
  5. h1 = { :a=>1, :b=>2, :c=>2 }
  6. h2 = { :c=>3 }
  7. h3 = h1.reverse_merge(h2)
  8. assert_equal( 2, h3[:c] )
  9. end
  10. end