Tracing Delayed Job Errors in the Test Environment

We use delayed job a lot.  Typically thredUP.com has 8 workers chewing through background tasks.  One of the annoying things we have run into is in our test suite we have had to write custom cucumber steps and have to drop in debug lines when a delayed job fails so we can peer into the queue easily.  This was a pain in the ass cause it usually means re-running the tests that are failing.

Recently we added an initializer to push delayed job errors to Hoptoad (aka Airbrake):

This works great for running down bugs in production but doesn't solve the test environment problem - we aren't about to start pushing test errors to Hoptoad.  After using this for the last few weeks a simple thought occurred to me that made me feel like a huge idiot. Just drop in some awesome_print output right there.   

Well, now we have nice and pretty delayed_job output for the test environment and it's a little scary, there are failures we didn't even know about!