aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r--actionpack/test/abstract_unit.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb
index 2640e96453..c8477fb83f 100644
--- a/actionpack/test/abstract_unit.rb
+++ b/actionpack/test/abstract_unit.rb
@@ -38,6 +38,17 @@ end
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
+module Rails
+end
+
+# Monkey patch the old router initialization to be silenced.
+class ActionDispatch::Routing::DeprecatedMapper
+ def initialize_with_silencer(*args)
+ ActiveSupport::Deprecation.silence { initialize_without_silencer(*args) }
+ end
+ alias_method_chain :initialize, :silencer
+end
+
ActiveSupport::Dependencies.hook!
# Show backtraces for deprecated behavior for quicker cleanup.