We are trying to automate the running of our rspec tests for our Rails app on a build server using Capistrano. The problem is that Capistrano seems to think that the command called to run the model tests failed when in fact I believe it succeeded. I believe the problem has to do with the return code from the command I am running.. The command I am running is:
ruby script/spec spec/models -f html:model_test_results.html The output file seems to be complete as it has both the opening and closing html tags and it has the results of all of our tests. But when I run $? To get the return code of the last command it says it was "1" which I believe signifies that the command was not successful and is what is causing our Capistrano task to abort. We are using RSpec 1.1.4 and in case you're curious the output from Capistrano looks like this: * executing "cd /data/nightingalenotes/releases/20080812160703 && ruby script/ spec spec/models -f html:public/rspec_test_results/model_test_results.html" servers: ["buildnexus.champ.net"] [buildnexus.champ.net] executing command command finished *** [deploy:update_code] rolling back * executing "rm -rf /data/nightingalenotes/releases/20080812160703; true" servers: ["buildnexus.champ.net"] [buildnexus.champ.net] executing command command finished command "cd /data/nightingalenotes/releases/20080812160703 && ruby script/spec s pec/models -f html:public/rspec_test_results/model_test_results.html" failed on buildnexus.champ.net Thanks! Ben Fyvie
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users