facets
facets copied to clipboard
Unexpected test-unit behavior with facets
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
require 'facets/symbol/call.rb' by itself will cause this error. See call method