diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-17 08:21:45 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-17 08:21:45 +0000 |
commit | 8a73d4fe6f2e22f0f9c6a99305357b00bf1ba86f (patch) | |
tree | dbc063c06c3f55241f9cc799110f4796e6a66d43 /activesupport/lib | |
parent | 2570f408f0326bf9c7a9cbae55e0ccf909b8c820 (diff) | |
download | rails-8a73d4fe6f2e22f0f9c6a99305357b00bf1ba86f.tar.gz rails-8a73d4fe6f2e22f0f9c6a99305357b00bf1ba86f.tar.bz2 rails-8a73d4fe6f2e22f0f9c6a99305357b00bf1ba86f.zip |
Deprecation: silence warnings when reporting test errors.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
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 |