C
Curt Sampson
In many of my tests, I do something along the lines of
assert_match(/foobar/, content)
When the assertion fails, it prints out something resembling the
inspect of the content. In some cases, it's much more readable to print
something different. How do I do that for this one case, but leave the
default behaviour for other cases in the program.
I thought it would be as simple as overriding the inspect method on
content, but that doesn't do the trick.
I've been through the internals of Test::Unit::Assertion, and it seems
to frustrate this effort.
cjs
assert_match(/foobar/, content)
When the assertion fails, it prints out something resembling the
inspect of the content. In some cases, it's much more readable to print
something different. How do I do that for this one case, but leave the
default behaviour for other cases in the program.
I thought it would be as simple as overriding the inspect method on
content, but that doesn't do the trick.
I've been through the internals of Test::Unit::Assertion, and it seems
to frustrate this effort.
cjs