Skip to content
This repository

spec failure when using drb returns exit status 0 #366

Closed
chrisb87 opened this Issue · 1 comment

2 participants

Chris Baker David Chelimsky
Chris Baker

I am using Rspec 2 with Spork and Watchr. I would like to detect if the specs passed or not in my watchr script, but the rspec command always exits with 0 when run with the --drb flag.

I opened a ticket in the spork project and one of the developers determined that a small change to rspec can enable these three tools to play nicely together.

Ok, it looks like it's a change needed on rspec. Here's what's going on

rspec calls Spork::Server#run via DRB, passing in args, stderr and stdout.

Eventually, spork calls Spork::TestFramework::RSpec#run_tests, which then calls ::Spec::Runner::CommandLine#run with the same args, stderr and stdout it received.

When ::Spec::Runner::CommandLine#run finishes, it returns true if all specs passed, and false if all specs didn't pass. I've confirmed that Spork::Server#run ultimately returns this value via DRB back to the rspec drb client.

What needs to happen is the rspec drb client should take this result and modify the exit status based on the result: 1 if false (errors happened), 0 if true (all good).

Can you pass this on to the rspec team? It should be a simple fix.

David Chelimsky
Owner

Thanks for reporting this here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.