I’m writing a method_missing handler to “automagically” create
assertions from predicate functions. So, for example, one use might be:
assert_not_include ‘[email protected]’, response.to
-or-
assert_include ‘[email protected]’, response.from
The code is working properly, but when I trigger an assert, the
backtrace shows something like:
- Failure:
test_confirm(ContactMailerTest)
[./test/unit/…/test_helper.rb:74:inmethod_missing' ./test/unit/../test_helper.rb:61:in
method_missing’
./test/unit/contact_mailer_test.rb:39:in `test_confirm’]:
assert_not_include: expected [email protected] not in [email protected]
What I’d prefer is to remove the items in the backtrace array that refer
to the test method because they don’t add information but am not certain
how. Rails uses clean_backtrace, which looks like it should work, but no
luck with that.
Any help appreciated.