Skip to content

Instantly share code, notes, and snippets.

@OpenCoderX
Forked from ianmurrays/deploy.rb
Created February 1, 2013 18:34
Show Gist options
  • Save OpenCoderX/4693149 to your computer and use it in GitHub Desktop.
Save OpenCoderX/4693149 to your computer and use it in GitHub Desktop.
set :test_log, "logs/capistrano.test.log"
namespace :deploy do
before 'deploy:update_code' do
puts "--> Running tests, please wait ..."
unless system "bundle exec rake > #{test_log} 2>&1" #' > /dev/null'
puts "--> Tests failed. Run `cat #{test_log}` to see what went wrong."
exit
else
puts "--> Tests passed"
system "rm #{test_log}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment