test-unit/test-unit — pull request #37 by sikachu (2012-07-30 19:55:23+00:00)
Title: Make assert_(not_)match works on non-String object

Previously, if we're trying to pass in a Object that implements `=~` method to `assert_not_match`, we would get `TypeError` because ruby will try to convert that object into a String. This can be fixed by swapping the operands and calling `=~` on the object instead.

I faced this error when I was trying to use `assert_not_match` on Mail::Body object, which is not a string but implement `=~` method.