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_thread.rb | |
parent | 287d2adab0ce45018ada9941ce4eaf67ba6a4d3a (diff) |
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_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index ab1b81a8fe..33d2daf266 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -64,14 +64,14 @@ class TestThread < Test::Unit::TestCase end def test_thread_variable? - refute Thread.new { Thread.current.thread_variable?("foo") }.join.value + Thread.new { assert_not_send([Thread.current, :thread_variable?, "foo"]) }.value t = Thread.new { Thread.current.thread_variable_set("foo", "bar") }.join - assert t.thread_variable?("foo") - assert t.thread_variable?(:foo) - refute t.thread_variable?(:bar) + assert_send([t, :thread_variable?, "foo"]) + assert_send([t, :thread_variable?, :foo]) + assert_not_send([t, :thread_variable?, :bar]) end def test_thread_variable_strings_and_symbols_are_the_same_key @@ -140,7 +140,7 @@ class TestThread < Test::Unit::TestCase end t1.kill t2.kill - assert_operator(c1, :>, c2, "[ruby-dev:33124]") # not guaranteed + assert_send([c1, :>, c2], "[ruby-dev:33124]") # not guaranteed end def test_new |