Permalink
Browse files

Don't dump schema for every test run, just when migrations are run

  • Loading branch information...
1 parent 899d63b commit 8e74a434b8f13bd1697ad556c9fd1ef0217e594e @jeremy jeremy committed Jun 16, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/lib/tasks/databases.rake
@@ -337,10 +337,10 @@ namespace :db do
end
end
- desc 'Prepare the test database and load the schema'
- task :prepare => %w(environment db:abort_if_pending_migrations) 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:test:clone" }[ActiveRecord::Base.schema_format]].invoke
+ Rake::Task[{ :sql => "db:test:clone_structure", :ruby => "db:schema:load" }[ActiveRecord::Base.schema_format]].invoke
end
end
end

0 comments on commit 8e74a43

Please sign in to comment.