diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-17 03:52:01 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-17 16:01:48 -0700 |
commit | 6ffe32160e16398d347e6bcd396ad843ba68e52a (patch) | |
tree | c3927730c0a9483abd105b88035948cca9b861cb /railties/lib/tasks | |
parent | e328bdaab6c1cf920af3cabc0a27e32798a9fcb6 (diff) | |
download | rails-6ffe32160e16398d347e6bcd396ad843ba68e52a.tar.gz rails-6ffe32160e16398d347e6bcd396ad843ba68e52a.tar.bz2 rails-6ffe32160e16398d347e6bcd396ad843ba68e52a.zip |
Rely on quieter db:test:load task
Diffstat (limited to 'railties/lib/tasks')
-rw-r--r-- | railties/lib/tasks/databases.rake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/railties/lib/tasks/databases.rake b/railties/lib/tasks/databases.rake index 70de33e346..75fba8b45a 100644 --- a/railties/lib/tasks/databases.rake +++ b/railties/lib/tasks/databases.rake @@ -264,13 +264,15 @@ namespace :db do end namespace :test do - desc "Recreate the test database from the current environment's database schema" - task :clone => %w(db:schema:dump db:test:purge) do + desc "Recreate the test database from the current schema.rb" + task :load => 'db:test:purge' do ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) ActiveRecord::Schema.verbose = false Rake::Task["db:schema:load"].invoke end + desc "Recreate the test database from the current environment's database schema" + task :clone => %w(db:schema:dump db:test:load) desc "Recreate the test databases from the development structure" task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do @@ -340,7 +342,7 @@ namespace :db do desc 'Check for pending migrations and load the test schema' task :prepare => 'db:abort_if_pending_migrations' do if defined?(ActiveRecord) && !ActiveRecord::Base.configurations.blank? - Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:schema:load" }[ActiveRecord::Base.schema_format]].invoke + Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:test:load" }[ActiveRecord::Base.schema_format]].invoke end end end |