Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

@nateberkopec
Copy link

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?

@mperham
Copy link
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
@nateberkopec
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants