Created
March 30, 2012 13:37
-
-
Save cheerfulstoic/2251619 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rake' | |
require 'fileutils' | |
require "bundler" | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:spec) | |
desc "Task for cruise Control" | |
task :cruise => [:copy_database_config] do | |
RAILS_ENV = ENV['RAILS_ENV'] = 'test' | |
Bundler.setup(:default, :test) | |
CruiseControl::invoke_rake_task 'db:migrate' | |
CruiseControl::invoke_rake_task 'test' | |
CruiseControl::invoke_rake_task 'spec' | |
end | |
task :copy_database_config do | |
FileUtils.cp(File.dirname(__FILE__) + '/../../config/database.yml.cruise', File.dirname(__FILE__) + '/../../config/database.yml') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment