diff options
author | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-08 17:06:11 +0000 |
---|---|---|
committer | ntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-11-08 17:06:11 +0000 |
commit | 152380a87c7f26445141e845eaab95fe20c42918 (patch) | |
tree | 871f5125a953c2462bfb4a01567315db31fff5fc /lib | |
parent | c103eb6793b69d98a5e135ad4ddef09db364ec5b (diff) | |
download | ruby-152380a87c7f26445141e845eaab95fe20c42918.tar.gz |
* lib/test/unit/assertions.rb: un-deprecated #assert_not_nil to
maintain symmetry with #assert_nil. Also added better output for
#assert_kind_of.
* test/testunit/tc_assertions.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/unit/assertions.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb index fdb9632e09..c9ee8c101a 100644 --- a/lib/test/unit/assertions.rb +++ b/lib/test/unit/assertions.rb @@ -104,7 +104,7 @@ EOT def assert_kind_of(klass, object, message="") _wrap_assertion do assert(klass.kind_of?(Module), "The first parameter to assert_kind_of should be a kind_of Module.") - full_message = build_message(message, "<?>\nexpected to be kind_of\\?<?>.", object, klass) + full_message = build_message(message, "<?>\nexpected to be kind_of\\?\n<?> but was\n<?>.", object, klass, object.class) assert_block(full_message){object.kind_of?(klass)} end end @@ -221,7 +221,6 @@ EOT # Passes if !object.nil?. public def assert_not_nil(object, message="") - warn("Assertions#assert_not_nil is deprecated and will be removed after 1.8.1. Use #assert.") full_message = build_message(message, "<?> expected to not be nil.", object) assert_block(full_message){!object.nil?} end |