From 8a73d4fe6f2e22f0f9c6a99305357b00bf1ba86f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 17 Dec 2006 08:21:45 +0000 Subject: Deprecation: silence warnings when reporting test errors. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/deprecation.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'activesupport/lib') 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 -- cgit v1.2.3