This switches the order of the equality comparison in
assert_equal to prefer the equality operator of the expected
value. The idea is that the expected value is known and intended
so it should be the "basis" for the equality test as opposed to
the actual value that is unknown not always intended.
This is a very subtle change that really only comes into play when
you are comparing two objects that both define a custom equality
operator.
@kellyredding - Looks good :boom: Your commit message at the beginning has both "adds" and "switches". I think you just want "This switches the order".
This switches the order of the equality comparison in
assert_equal
to prefer the equality operator of the expected value. The idea is that the expected value is known and intended so it should be the "basis" for the equality test as opposed to the actual value that is unknown not always intended.This is a very subtle change that really only comes into play when you are comparing two objects that both define a custom equality operator.
Closes #184.
@jcredding ready for review.