Closed nateberkopec closed 11 years ago
I would propose removing the at_exit handler completely. It's been more trouble than it's worth.
Tested 0.11.0 and Airbrake with girl_friday enabled, and it now works properly with an exit status of 1 instead of 0 when tests fail.
Thanks for the fast fix!
We use airbrake in our Rails 3.1 app for error handling, which uses girl_friday for asynchronous notifications. When using that feature of the airbrake gem, I realized our test suites always returned a 0 exit status regardless of pass or failure, and regardless of which test suite I used (minitest or RSpec). This broke our CI process.
https://github.com/mperham/girl_friday/blob/master/lib/girl_friday.rb#L96 is probably related. However, setting $testing to true in our spec_helper/test_helper does not resolve the bug.
I figured out pretty quickly that an at_exit callback was messing with our suites, but chasing it down with a binary search through our Gemfile wasn't very fun! Is there perhaps an easier way to identify whether or not girl_friday is being run in a testing environment?