lib/multiverse/railtie.rb in multiverse-0.0.1 vs lib/multiverse/railtie.rb in multiverse-0.0.2
- old
+ new
@@ -14,9 +14,15 @@
namespace :db do
task :load_config do
ActiveRecord::Tasks::DatabaseTasks.migrations_paths = [Multiverse.migrate_path]
ActiveRecord::Tasks::DatabaseTasks.db_dir = [Multiverse.db_dir]
end
+
+ namespace :test do
+ task purge: %w(environment load_config check_protected_environments) do
+ ActiveRecord::Tasks::DatabaseTasks.purge ActiveRecord::Base.configurations[Multiverse.env("test")]
+ end
+ end
end
end
end
end