Add db:migrate to cruise task for mysql branch

This commit is contained in:
Sarah Mei 2011-01-15 19:39:01 -08:00
parent 910ae49fca
commit bb04224187

View file

@ -1,6 +1,6 @@
namespace :cruise do
desc "Run all specs and features"
task :cruise => :environment do
task :cruise => [:environment, :'cruise:migrate'] do
puts "Starting virtual display..."
`sh -e /etc/init.d/xvfb start`
puts "Starting specs..."
@ -10,5 +10,11 @@ namespace :cruise do
`sh -e /etc/init.d/xvfb stop`
raise "tests failed!" unless exit_status == 0
end
task :migrate do
system('bundle exec rake db:migrate')
exit_status = $?.exitstatus
raise "db:migrate failed!" unless exit_status == 0
end
end
task :cruise => "cruise:cruise"