aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/deprecation_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-04 05:55:55 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-04 05:55:55 +0000
commit7269b086e1c3c6d43c97458efcc7c5c54a322b33 (patch)
treea74c94ebbb6cca11759b8e4da58da85b7a3df495 /activesupport/test/deprecation_test.rb
parentda8d7a7011b1d6e1bd9a5c757aa4514d4612c100 (diff)
downloadrails-7269b086e1c3c6d43c97458efcc7c5c54a322b33.tar.gz
rails-7269b086e1c3c6d43c97458efcc7c5c54a322b33.tar.bz2
rails-7269b086e1c3c6d43c97458efcc7c5c54a322b33.zip
silenced writer
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/deprecation_test.rb')
-rw-r--r--activesupport/test/deprecation_test.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb
index cda45c6a9f..12fe5f3bf2 100644
--- a/activesupport/test/deprecation_test.rb
+++ b/activesupport/test/deprecation_test.rb
@@ -9,7 +9,7 @@ class Deprecatee
def old_request; @request end
def partially(foo = nil)
- ActiveSupport::Deprecation.warn 'calling with foo=nil is out' if foo.nil?
+ ActiveSupport::Deprecation.warn('calling with foo=nil is out', caller) if foo.nil?
end
def not() 2 end
@@ -82,5 +82,9 @@ class DeprecationTest < Test::Unit::TestCase
ActiveSupport::Deprecation.silence do
assert_not_deprecated { @dtc.partially }
end
+
+ ActiveSupport::Deprecation.silenced = true
+ assert_not_deprecated { @dtc.partially }
+ ActiveSupport::Deprecation.silenced = false
end
end