Skip to content

Instantly share code, notes, and snippets.

@scharfie
Created October 12, 2010 18:51
Show Gist options
  • Save scharfie/622705 to your computer and use it in GitHub Desktop.
Save scharfie/622705 to your computer and use it in GitHub Desktop.
namespace :db do
task :rebuild => ['db:drop', 'db:create', 'db:migrate']
namespace :test do
task :rebuild => :environment do
RAILS_ENV = 'test'
ActiveRecord::Base.establish_connection(:test)
Rake::Task['db:rebuild'].invoke
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment