Skip to content

Instantly share code, notes, and snippets.

@cheerfulstoic
Created March 30, 2012 13:37
Show Gist options
  • Save cheerfulstoic/2251619 to your computer and use it in GitHub Desktop.
Save cheerfulstoic/2251619 to your computer and use it in GitHub Desktop.
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