Sha256: 552d4a8a9f9472f13c34b06aac7a2090731e706acd0cf4750c9ddd9f270373a0
Contents?: true
Size: 493 Bytes
Versions: 11
Compression:
Stored size: 493 Bytes
Contents
require 'facets/hash/op_and' require 'test/unit' class TC_Hash_Op < Test::Unit::TestCase def test_op_and_hash a = { :a => 1, :b => 2 } b = { :a => 1 } r = { :a => 1 } assert_equal( r, a & b ) end def test_op_and_hash_subarray a = { :a => [1], :b => [2] } b = { :a => [1] } r = { :a => [1] } assert_equal( r, a & b ) end def test_op_and_array a = { :a => 1, :b => 2 } b = [ :a ] r = { :a => 1 } assert_equal( r, a & b ) end end
Version data entries
11 entries across 11 versions & 1 rubygems