diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/deprecation.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index b9c732691a..247aa4e1ad 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -172,10 +172,23 @@ class Module include ActiveSupport::Deprecation::ClassMethods end +require 'test/unit' + module Test module Unit class TestCase include ActiveSupport::Deprecation::Assertions end + + class Error # :nodoc: + # Silence warnings when reporting test errors. + def message_with_silenced_deprecation + ActiveSupport::Deprecation.silence do + message_without_silenced_deprecation + end + end + + alias_method_chain :message, :silenced_deprecation + end end end |