diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-24 07:13:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-24 07:13:35 +0000 |
commit | 3c0cbea874a38ee233cae86e1dd854f00d5d6b00 (patch) | |
tree | 098eb0329c7ccf6ac59733d9cd2878f9357c21de /lib/test/unit | |
parent | 305dcadeccb2cd009f3c79925bf5a86fce6cd119 (diff) | |
download | ruby-3c0cbea874a38ee233cae86e1dd854f00d5d6b00.tar.gz |
assertions.rb: assert_throw
* lib/test/unit/assertions.rb (assert_throw): make an alias of
assert_throws.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit')
-rw-r--r-- | lib/test/unit/assertions.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index afc45b6892..788a2e47fb 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -191,12 +191,7 @@ module Test # assert_throw(tag, "#{tag} was not thrown!") do # throw tag # end - def assert_throw(tag, msg = nil) - catch(tag) do - yield(tag) - assert(false, message(msg) {"Expected #{mu_pp(tag)} to have been thrown"}) - end - end + alias assert_throw assert_throws # :call-seq: # assert_equal( expected, actual, failure_message = nil ) |