Removing framework clutter from autotest failure stacktraces

If you’re programming in Ruby, then in the list of “should be’s” is “using autotest“, assuming you’re doing automated testing, which of course is a giant “should be”. One problem if you’re using a bunch of gems or Rails is that their code works and yours is broken but the failure stacktraces you’re reading contain their method names mixed in with yours. 99% of the time this is distracting. So, using some code from Faisal that did the same thing with an older version of Autotest but doesn’t work in the latest release, I hacked up the code to help remove unwanted text from Autotest test output. And now I present it to you.

This goes in your .autotest file:

Note that autotest will still print the unfiltered version; the filtered output will print afterwards, so just ignore the unfiltered stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *