When included in a Rails app, test suites always return 0 exit status #67

Closed
nateberkopec opened this Issue Nov 8, 2012 · 2 comments

Comments

Projects
None yet
2 participants

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?

Owner

mperham commented Nov 8, 2012

I would propose removing the at_exit handler completely. It's been more trouble than it's worth.

mperham added a commit that referenced this issue Nov 9, 2012

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!

@mperham mperham closed this Nov 9, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment