Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:29:56+00:00 2026-06-13T14:29:56+00:00

I’ve got a Rails 3.2.8 project with both legacy test/unit (minitest) tests and RSpecs.

  • 0

I’ve got a Rails 3.2.8 project with both legacy test/unit (minitest) tests and RSpecs. Although we have Jenkins running continuous integration, we haven’t noticed failures in a while. The reason is that something seems to be overriding the exit code on a test failure and returning an exit code of 0 regardless whether there is a failing test, or spec.

I’ve done some digging, but would like to dig into the Kernel#at_exit stack to see what gems/plugins are registering a proc. I know it’s a language feature that’s implemented in C.

So, I’m looking for help shaving this yak:

  • Why do my failing tests return exit code of 0?
  • Assuming something is adding a proc/callback to at_exit, how to I get in to see what the callbacks are?
    • I know it’s written in C, and have looked at the source. I don’t see any ruby hooks into it. Are there 3rd party extensions that can be added, or is anyone aware of a patch to ruby that allows some visibility there?
    • Would dtrace work to get in there and look?

Some things I’ve done:

  • I’ve grepped the gems and the installed libraries for at_exit but didn’t find anything too suspicious.
  • Using the same gemset in my Rails app, if I create a new app with a single spec and run it it works as expected (passing tests return exit code 0 and failures return 1)
  • Looked to find patches/extensions to ruby that help provide visibility into at_exit

Some things I haven’t done yet:

  • Tried to learn DTrace (I’m on a mac) – I’ve seen presentations showing how to use it, but I’ve not tried yet.
  • remove every gem from my project to see what might be causing it — it does seem to be project specific.

Thanks for your help in advance!

P.S.: Here are the gems in this project’s Gemfile:

gem 'rails', '~> 3.2.8'
gem 'acts-as-taggable-on', '~> 2.3.1'
gem "akamai_api", :path => "vendor/git/akamai_api"
gem 'dalli'
gem "gabba"
gem "googlecharts", :require => "gchart"
gem "hpricot"
gem 'jquery-rails'
gem 'linkscape'
gem "logging", "1.4.3"
gem 'machinist', '>= 2.0.0.beta2'
gem "mysql2"
gem 'newrelic_rpm'
gem "premailer-rails3"
gem 'rack-cache'
gem "rack-ssl-enforcer"
gem 'sendgrid'
gem "tokyocabinet", "1.29"
gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'
gem "useragent"
gem "yajl-ruby", :require => "yajl"

group :assets do
  gem 'coffee-rails'
  gem 'sass-rails'
  gem 'uglifier'
end

group :no_rake do
  gem "vanity"
end

group :development, :test do
  gem 'debugger'
  gem 'thin'
  gem 'rspec-rails'
end

group :test do
  gem 'vanity'
  gem 'minitest-rails'
  gem 'mocha'
end

As an update, I did a binary tree search in the Gemfile (turn half off, run the tests, turn the other half off.. repeat) until I got the tests to fail properly. The logging gem was causing rspec to return nonzero, and the googlecharts gem was messing up test/unit. At this point, I don’t know why.

I haven’t dug in further to see which behavior(s) of the libraries (or the dependent code in my app) are affecting the tests. A quick grep didn’t return anything using Kernel#at_exit and a quick glance of the source on each of those didn’t turn up anything either. I’ll keep digging, but that’s what I found out so far.

I haven’t filed bug reports, as I don’t yet know what the problem is.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:29:58+00:00Added an answer on June 13, 2026 at 2:29 pm

    You gotta love ruby 🙂

    alias original_at_exit at_exit
    def at_exit(*args, &block)
      puts "registered at exit: #{caller * "\n"}"
      original_at_exit *args, &block
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have just tried to save a simple *.rtf file with some websites and
I have a small JavaScript validation script that validates inputs based on Regex. I
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.