public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Rely on quieter db:test:load task
jeremy (author)
Tue Jun 17 03:52:01 -0700 2008
commit  6ffe32160e16398d347e6bcd396ad843ba68e52a
tree    c3927730c0a9483abd105b88035948cca9b861cb
parent  e328bdaab6c1cf920af3cabc0a27e32798a9fcb6
...
264
265
266
267
268
 
 
269
270
271
272
273
 
 
274
275
276
...
340
341
342
343
 
344
345
346
...
264
265
266
 
 
267
268
269
270
271
272
273
274
275
276
277
278
...
342
343
344
 
345
346
347
348
0
@@ -264,13 +264,15 @@ namespace :db do
0
   end
0
 
0
   namespace :test do
0
-    desc "Recreate the test database from the current environment's database schema"
0
-    task :clone => %w(db:schema:dump db:test:purge) do
0
+    desc "Recreate the test database from the current schema.rb"
0
+    task :load => 'db:test:purge' do
0
       ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test'])
0
       ActiveRecord::Schema.verbose = false
0
       Rake::Task["db:schema:load"].invoke
0
     end
0
 
0
+    desc "Recreate the test database from the current environment's database schema"
0
+    task :clone => %w(db:schema:dump db:test:load)
0
 
0
     desc "Recreate the test databases from the development structure"
0
     task :clone_structure => [ "db:structure:dump", "db:test:purge" ] do
0
@@ -340,7 +342,7 @@ namespace :db do
0
     desc 'Check for pending migrations and load the test schema'
0
     task :prepare => 'db:abort_if_pending_migrations' do
0
       if defined?(ActiveRecord) && !ActiveRecord::Base.configurations.blank?
0
-        Rake::Task[{ :sql  => "db:test:clone_structure", :ruby => "db:schema:load" }[ActiveRecord::Base.schema_format]].invoke
0
+        Rake::Task[{ :sql  => "db:test:clone_structure", :ruby => "db:test:load" }[ActiveRecord::Base.schema_format]].invoke
0
       end
0
     end
0
   end

Comments