From bb04224187378bbe277584a7c14e28ea7fb91c40 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sat, 15 Jan 2011 19:39:01 -0800 Subject: [PATCH] Add db:migrate to cruise task for mysql branch --- lib/tasks/cruise.rake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/tasks/cruise.rake b/lib/tasks/cruise.rake index 91c3f31d8..a41c72ec4 100644 --- a/lib/tasks/cruise.rake +++ b/lib/tasks/cruise.rake @@ -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"