Sha256: 58d2ec618317917dcb306c8aab238c7fda6fd74eac4aa71055f2e783571f0c6e

Contents?: true

Size: 393 Bytes

Versions: 11

Compression:

Stored size: 393 Bytes

Contents

require 'facets/hash/op_sub'
require 'test/unit'

class TC_Hash_Op < Test::Unit::TestCase

  def test_op_sub_array
    a = { :a => 1, :b => 2, :c => 3 }
    b = [ :a ]
    e = { :b => 2, :c => 3 }
    assert_equal( e, a - b )
  end

  def test_op_sub_hash
    a = { :a => 1, :b => 2, :c => 3 }
    b = { :a => 1, :d => 4 }
    e = { :b => 2, :c => 3 }
    assert_equal( e, a - b )
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
facets-2.8.4 test/core/hash/test_op_sub.rb
facets-2.8.3 test/core/hash/test_op_sub.rb
facets-2.8.2 test/core/hash/test_op_sub.rb
facets-2.8.1 test/core/hash/test_op_sub.rb
facets-2.8.0 test/core/hash/test_op_sub.rb
facets-2.7.0 test/core/hash/test_op_sub.rb
facets-2.6.0 test/core/hash/test_op_sub.rb
facets-2.5.1 test/core/hash/test_op_sub.rb
facets-2.5.0 test/core/hash/test_op_sub.rb
facets-2.4.5 test/core/hash/test_op_sub.rb
facets-2.5.2 test/core/hash/test_op_sub.rb