facets icon indicating copy to clipboard operation
facets copied to clipboard

Unexpected test-unit behavior with facets

Open jessebs opened this issue 5 years ago • 1 comments

Requiring facets in test-unit unit tests causes invalid assertions to pass.

See the below code reference

require 'test/unit'

require 'facets'

class TestExample < Test::Unit::TestCase
  def test_hash
    assert_equal({'name' => 'left'}, {'name' => 'right'})
  end
end

The assertion passes even though the hashes are not equal. Commenting out the require for facets makes the assertion behave as expected.

Using test-unit 3.3.0 and facets 3.1.0

jessebs avatar Feb 22 '19 21:02 jessebs

require 'facets/symbol/call.rb' by itself will cause this error. See call method

GregLawson avatar Jun 17 '19 23:06 GregLawson