From 9a642931fbcc4bab0edffe41d3e7bf59e250e90e Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 7 Mar 2016 11:52:51 +0900 Subject: Prevent not-intended loading of `ActionDispatch::IntegrationTest` After 9d378747326d26cf1afdac4433ead22967af0984 `ActionDispatch::IntegrationTest` class is loaded and defined in all Rails environments, not only test but also production. This is not-intended loading of a class which is only used in test environment. To prevent not-intended loading, add `ActiveSupport.run_load_hooks` to `ActionDispatch::IntegrationTest` with `action_dispatch_integration_test` name and use it in `ActionMailer`. --- actionpack/lib/action_dispatch/testing/integration.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index f4534b4173..b0b5db704b 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -764,5 +764,7 @@ module ActionDispatch def self.register_encoder(*args) Integration::Session::RequestEncoder.register_encoder(*args) end + + ActiveSupport.run_load_hooks(:action_dispatch_integration_test, self) end end -- cgit v1.2.3