diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 09:18:05 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-13 09:18:05 +0000 |
commit | 3ac0ec4ecdea849143ed64e8935e6675b341e44b (patch) | |
tree | fe18c8213610bfdbca51b687133caf5ab297b882 /test/ruby/test_hash.rb | |
parent | 287d2adab0ce45018ada9941ce4eaf67ba6a4d3a (diff) | |
download | ruby-3ac0ec4ecdea849143ed64e8935e6675b341e44b.tar.gz |
test/ruby: better assertions
* test/ruby: use better assertions instead of mere assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r-- | test/ruby/test_hash.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 208e628a6b..3273d66c45 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -492,7 +492,7 @@ class TestHash < Test::Unit::TestCase h = @cls[ 'a' => 1, 'b' => 2, 'c' => 1].invert assert_equal(2, h.length) - assert(h[1] == 'a' || h[1] == 'c') + assert_include(%w[a c], h[1]) assert_equal('b', h[2]) end @@ -787,7 +787,7 @@ class TestHash < Test::Unit::TestCase assert_nil(h.default_proc = nil) assert_nil(h.default_proc) h.default_proc = ->(h, k){ true } - assert(h[:nope]) + assert_equal(true, h[:nope]) h = @cls[] assert_nil(h.default_proc) end |