diff --git a/test/fake_app.rb b/test/fake_app.rb
index <HASH>..<HASH> 100644
--- a/test/fake_app.rb
+++ b/test/fake_app.rb
@@ -2,7 +2,6 @@
 
 ENV['DB'] ||= 'sqlite3'
 require 'active_record/railtie'
-load 'active_record/railties/databases.rake'
 
 module DatabaseRewinderTestApp
   Application = Class.new(Rails::Application) do
@@ -14,6 +13,8 @@ module DatabaseRewinderTestApp
   end.initialize!
 end
 
+load 'active_record/railties/databases.rake'
+
 require 'active_record/base'
 ActiveRecord::Tasks::DatabaseTasks.root ||= Rails.root
 ActiveRecord::Tasks::DatabaseTasks.drop_current ENV['DB']
Rails 6 expects the Rails::Application to be defined before loading database.rake