Sha256: cc4ac9cec52e4c808543d00c81886dde6341b8b94601f559049688932a9faedf

Contents?: true

Size: 561 Bytes

Versions: 5

Compression:

Stored size: 561 Bytes

Contents

covers 'facets/hash/reverse_merge'

test_case Hash do

  method :reverse_merge do

    test do
      h1 = { :a=>1, :b=>2, :c=>2 }
      h2 = { :c=>3 }
      h3 = h1.reverse_merge(h2)
      h3[:c].assert == 2
    end

  end

  method :reverse_merge! do

    test do
      h1 = { :a=>1, :b=>2, :c=>2 }
      h2 = { :c=>3 }
      h1.reverse_merge!(h2)
      h1[:c].assert == 2
    end

  end

  method :reverse_update do

    test do
      h1 = { :a=>1, :b=>2, :c=>2 }
      h2 = { :c=>3 }
      h1.reverse_update(h2)
      h1[:c].assert == 2
    end

  end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 test/core/hash/test_reverse_merge.rb
facets-3.1.0 test/core/hash/test_reverse_merge.rb
facets-3.0.0 test/core/hash/test_reverse_merge.rb
facets-2.9.3 test/core/hash/test_reverse_merge.rb
facets-2.9.2 test/core/hash/test_reverse_merge.rb