diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 19:55:04 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 19:55:04 +0000 |
commit | db4e842b7074f86e367e5faa091bb81b48b276ce (patch) | |
tree | e7b8c7b64ccd59fccb379e7247a0c063f4dfb108 /lib/test | |
parent | 0039430d54bebf41e2cd0e71f8c03a4560026110 (diff) | |
download | ruby-db4e842b7074f86e367e5faa091bb81b48b276ce.tar.gz ruby-db4e842b7074f86e367e5faa091bb81b48b276ce.tar.xz ruby-db4e842b7074f86e367e5faa091bb81b48b276ce.zip |
* Fix variable name.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test')
-rw-r--r-- | lib/test/unit/assertions.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index 7c2c721fc..d9c9e096b 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -374,7 +374,7 @@ EOT } #` ## - # Passes if the block throws +expected_value+ + # Passes if the block throws +expected_object+ # # Example: # assert_throws :done do @@ -382,22 +382,22 @@ EOT # end public - def assert_throws(expected_value, message="", &proc) + def assert_throws(expected_object, message="", &proc) _wrap_assertion do assert_block("Should have passed a block to assert_throws."){block_given?} caught = true begin - catch(expected_value) do + catch(expected_object) do proc.call caught = false end - full_message = build_message(message, "<?> should have been thrown.", expected_value) + full_message = build_message(message, "<?> should have been thrown.", expected_object) assert_block(full_message){caught} rescue ArgumentError => error if UncaughtThrow[error.class] !~ error.message raise error end - full_message = build_message(message, "<?> expected to be thrown but\n<#$1> was thrown.", expected_value) + full_message = build_message(message, "<?> expected to be thrown but\n<#$1> was thrown.", expected_object) flunk(full_message) end end |