Browse files

Abort with non-zero exit status if any command fails

  • Loading branch information...
1 parent c771682 commit 4dddd85db36ad0fe998184e8d2773badf39bfe03 @alindeman alindeman committed Sep 16, 2012
Showing with 9 additions and 9 deletions.
  1. +9 −9 templates/run_specs.rb
@@ -1,9 +1,9 @@
-run('rspec spec -cfdoc')
-run('rake --trace spec')
-run('rake --trace spec:requests')
-run('rake --trace spec:models')
-run('rake --trace spec:views')
-run('rake --trace spec:controllers')
-run('rake --trace spec:helpers')
-run('rake --trace spec:mailers')
-run("rake --trace stats")
+run('rspec spec -cfdoc') || abort
+run('rake --trace spec') || abort
+run('rake --trace spec:requests') || abort
+run('rake --trace spec:models') || abort
+run('rake --trace spec:views') || abort
+run('rake --trace spec:controllers') || abort
+run('rake --trace spec:helpers') || abort
+run('rake --trace spec:mailers') || abort
+run("rake --trace stats") || abort

1 comment on commit 4dddd85

seejee commented on 4dddd85 Sep 17, 2012

Hi @alindeman !

I saw that the Travis build was failing, so I played around with this for a while. First, all specs passed on my machine. But, I found that running rake spec:requests from inside the tmp/example_app dir caused the same error as on the Travis server. However, it worked when I ran bundle exec rake spec:requests

I'm not sure how bundler works in the context of thor and rails templates, but perhaps adding bundle exec inside each run() command above will fix the issue on Travis?

Please sign in to comment.