diff --git a/activemodel/test/cases/railtie_test.rb b/activemodel/test/cases/railtie_test.rb
index <HASH>..<HASH> 100644
--- a/activemodel/test/cases/railtie_test.rb
+++ b/activemodel/test/cases/railtie_test.rb
@@ -5,10 +5,10 @@ class RailtieTest < ActiveModel::TestCase
   include ActiveSupport::Testing::Isolation
 
   def setup
-    require 'rails/all'
+    require 'active_model/railtie'
 
-    @app ||= Class.new(::Rails::Application).tap do |app|
-      app.config.eager_load = false
+    @app ||= Class.new(::Rails::Application) do
+      config.eager_load = false
     end
   end
Require active_model/railtie directly instead of rails/all

Use Class.new with a block instead of tap to configure it.