diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-15 03:56:25 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-15 03:56:25 +0000 |
commit | 069b0eaf0bd42a2474028022b1e907dc97cc2e41 (patch) | |
tree | 4b7daa6e336713616783d345432fa31b268a8776 /activesupport/test | |
parent | 643571ca25bc2fcc701e6def0975f56fe10a732f (diff) | |
download | rails-069b0eaf0bd42a2474028022b1e907dc97cc2e41.tar.gz rails-069b0eaf0bd42a2474028022b1e907dc97cc2e41.tar.bz2 rails-069b0eaf0bd42a2474028022b1e907dc97cc2e41.zip |
assert_deprecated matches any warning caught in block
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5114 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/deprecation_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/test/deprecation_test.rb b/activesupport/test/deprecation_test.rb index 12fe5f3bf2..a7d833f49d 100644 --- a/activesupport/test/deprecation_test.rb +++ b/activesupport/test/deprecation_test.rb @@ -78,6 +78,15 @@ class DeprecationTest < Test::Unit::TestCase end end + def test_assert_deprecated_matches_any_warning + assert_deprecated 'abc' do + ActiveSupport::Deprecation.warn 'abc' + ActiveSupport::Deprecation.warn 'def' + end + rescue Test::Unit::AssertionFailedError + flunk 'assert_deprecated should match any warning in block, not just the last one' + end + def test_silence ActiveSupport::Deprecation.silence do assert_not_deprecated { @dtc.partially } |