[rspec-users] Accidentally overriding exit code of specs

Andy Lindeman alindeman at gmail.com
Thu Nov 29 15:23:04 UTC 2012

On Thu, Nov 29, 2012 at 9:59 AM, Marko Anastasov <marko at renderedtext.com> wrote:
> Is it possible to write something in spec_helper.rb which would make "rake spec" start returning wrong exit code (zero) when there are failing specs? Something with config.around(:each) for example.
> I'm wondering because at https://semaphoreapp.com we sometimes have support questions which boil down to - there are failing specs, but the exit code was zero.

If RSpec exits with 0 yet there was a failing spec, it sounds like a
bug in RSpec. Let's fix it if so :) Do you have a reproducable test

Notably, we did recently fix an issue with RSpec interacting with
other frameworks that use `at_exit` and `exit` (e.g.,
minitest/test::unit): <https://github.com/rspec/rspec-core/pull/720>
but it has not yet made it into an official release. This is an
uncommon situation though, I'd say.

Andy Lindeman

More information about the rspec-users mailing list