aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-09-01 16:09:37 +0930
committerGitHub <noreply@github.com>2017-09-01 16:09:37 +0930
commitd0d7ce001bdbb0e5551da881caf8156c06238b84 (patch)
treedc9ed4628ea1e6f5d0f0591d76ac7024ca147814 /actionpack/lib/action_controller/test_case.rb
parent2cd8ac1b68ba04ca12a816c8113271017b3c43c4 (diff)
parent50dbf817d43569c54300827b5f88702eba12dad6 (diff)
downloadrails-d0d7ce001bdbb0e5551da881caf8156c06238b84.tar.gz
rails-d0d7ce001bdbb0e5551da881caf8156c06238b84.tar.bz2
rails-d0d7ce001bdbb0e5551da881caf8156c06238b84.zip
Merge pull request #29233 from matthewd/redefine-method
Clarify intentions around method redefinitions
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 50a96bce98..74d557fc18 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -4,6 +4,7 @@ require "rack/session/abstract/id"
require "active_support/core_ext/hash/conversions"
require "active_support/core_ext/object/to_query"
require "active_support/core_ext/module/anonymous"
+require "active_support/core_ext/module/redefine_method"
require "active_support/core_ext/hash/keys"
require "active_support/testing/constant_lookup"
require_relative "template_assertions"
@@ -19,7 +20,7 @@ module ActionController
# the database on the main thread, so they could open a txn, then the
# controller thread will open a new connection and try to access data
# that's only visible to the main thread's txn. This is the problem in #23483.
- remove_method :new_controller_thread
+ silence_redefinition_of_method :new_controller_thread
def new_controller_thread # :nodoc:
yield
end