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

Already on GitHub? Sign in to your account

spec failure when using drb returns exit status 0 #366

Closed
chrisb87 opened this Issue May 6, 2011 · 1 comment

Comments

Projects
None yet
2 participants

chrisb87 commented May 6, 2011

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.

Owner

dchelimsky commented May 6, 2011

Thanks for reporting this here!

@dchelimsky dchelimsky closed this in 7410e6f May 7, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment