Permalink
Browse files

Quiet while testing, you.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4961 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 7466c11 commit 23d579b262e6f665d8d343d066aa7fd640ce46b4 @jeremy jeremy committed Sep 4, 2006
Showing with 5 additions and 7 deletions.
  1. +1 −2 activesupport/lib/active_support/deprecation.rb
  2. +4 −5 activesupport/test/deprecation_test.rb
@@ -87,10 +87,9 @@ def collect_deprecations
deprecations = []
ActiveSupport::Deprecation.behavior = Proc.new do |message|
deprecations << message
- old_behavior.call(message) if old_behavior
end
yield
- return deprecations
+ deprecations
ensure
ActiveSupport::Deprecation.behavior = old_behavior
end
@@ -39,7 +39,7 @@ def test_inline_deprecation_warning
@dtc.partially
end
end
-
+
def test_undeprecated
assert_not_deprecated do
assert_equal 2, @dtc.not
@@ -67,21 +67,20 @@ def test_nil_behavior_is_ignored
def test_deprecated_instance_variable_proxy
assert_not_deprecated { @dtc.request.size }
-
+
assert_deprecated('@request.size') { assert_equal @dtc.request.size, @dtc.old_request.size }
assert_deprecated('@request.to_s') { assert_equal @dtc.request.to_s, @dtc.old_request.to_s }
end
-
+
def test_assert_deprecation_without_match
assert_deprecated do
@dtc.partially
end
end
-
+
def test_silence
ActiveSupport::Deprecation.silence do
assert_not_deprecated { @dtc.partially }
end
end
-
end

0 comments on commit 23d579b

Please sign in to comment.