Drop the integration databases in rebuild

This commit is contained in:
Raphael Sofaer 2011-07-19 16:10:42 -07:00
parent bd1c8efe54
commit 70be713b15

View file

@ -4,7 +4,7 @@
namespace :db do
desc "rebuild and prepare test db"
task :rebuild => [:drop, :create, :migrate, :seed,'db:test:prepare']
task :rebuild => [:drop, :drop_integration, :create, :migrate, :seed, 'db:test:prepare']
namespace :integration do
# desc 'Check for pending migrations and load the integration schema'
@ -81,6 +81,14 @@ namespace :db do
end
task :add_user => :environment
task :drop_integration do
ActiveRecord::Base.configurations.keys.select{ |k|
k.include?("integration")
}.each{ |k|
drop_database ActiveRecord::Base.configurations[k]
}
end
task :fix_diaspora_handle do
puts "fixing the people in this seed"
require File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment')