Permalink
Browse files

Don't warn when the deprecated ivar proxy is instantiated.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4698 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Aug 7, 2006
1 parent cfd9e05 commit 2bf8f2307e3f13a7b6cf703cdb954cc9a3f5244d
Showing with 3 additions and 5 deletions.
  1. +0 −1 activesupport/lib/active_support/deprecation.rb
  2. +3 −4 activesupport/test/deprecation_test.rb
@@ -78,7 +78,6 @@ class DeprecatedInstanceVariableProxy
def initialize(instance, method, var = "@#{method}")
@instance, @method, @var = instance, method, var
- deprecation_warning :initialize, caller
end
private
@@ -68,9 +68,8 @@ def test_nil_behavior_is_ignored
def test_deprecated_instance_variable_proxy
assert_not_deprecated { @dtc.request.size }
- assert_deprecated('Using @request directly is deprecated - call request instead.') do
- assert_equal @dtc.request.size, @dtc.old_request.size
- assert_equal @dtc.request.to_s, @dtc.old_request.to_s
- end
+ warning = 'Using @request directly is deprecated - call request instead.'
+ assert_deprecated(warning) { assert_equal @dtc.request.size, @dtc.old_request.size }
+ assert_deprecated(warning) { assert_equal @dtc.request.to_s, @dtc.old_request.to_s }
end
end

0 comments on commit 2bf8f23

Please sign in to comment.