Skip to content
Browse files

Added test to ensure that silence_warnings also returned its value

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3cf7a0a commit 42093fff9422ef66b595ef55a1e28df01a6fd2fc @dhh dhh committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 activesupport/test/core_ext/kernel_test.rb
View
4 activesupport/test/core_ext/kernel_test.rb
@@ -16,4 +16,8 @@ def test_silence_warnings_verbose_invariant
assert_equal old_verbose, $VERBOSE
end
end
+
+ def test_silence_warnings_with_return_value
+ assert_equal 1, silence_warnings { 1 }
+ end
end

0 comments on commit 42093ff

Please sign in to comment.
Something went wrong with that request. Please try again.