Marko Anastasov
2012-Nov-29 14:59 UTC
[rspec-users] Accidentally overriding exit code of specs
Hello, 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. Thanks, Marko
Andy Lindeman
2012-Nov-29 15:23 UTC
[rspec-users] Accidentally overriding exit code of specs
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 case? 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 http://www.andylindeman.com/
Marko Anastasov
2012-Nov-29 16:21 UTC
[rspec-users] Accidentally overriding exit code of specs
On Thu, Nov 29, 2012 at 4:23 PM, Andy Lindeman <alindeman at gmail.com> wrote:> 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 > case? > >I''m afraid I don''t, it''s not really my code - I can only view the output log. That''s why I''m asking for some general pointers (if there are any - I know you can''t really deal with problems without reproducible cases). I''ll see if I can get more data. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20121129/d09b8e08/attachment.html>