From 33604da3f68213b7bdb52c3e8af5767fbc5af79b Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 31 May 2015 04:45:10 +0000 Subject: test_tempfile.rb: use assert_predicate * test/test_tempfile.rb: use assert_predicate and assert_not_predicate for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_tempfile.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_tempfile.rb b/test/test_tempfile.rb index 1b609f4440..bcd953554a 100644 --- a/test/test_tempfile.rb +++ b/test/test_tempfile.rb @@ -112,16 +112,16 @@ class TestTempfile < Test::Unit::TestCase def test_close_and_close_p t = tempfile("foo") - assert !t.closed? + assert_not_predicate(t, :closed?) t.close - assert t.closed? + assert_predicate(t, :closed?) end def test_close_with_unlink_now_true_works t = tempfile("foo") path = t.path t.close(true) - assert t.closed? + assert_predicate(t, :closed?) assert_nil t.path assert_file.not_exist?(path) end @@ -143,7 +143,7 @@ class TestTempfile < Test::Unit::TestCase t = tempfile("foo") path = t.path t.close! - assert t.closed? + assert_predicate(t, :closed?) assert_nil t.path assert_file.not_exist?(path) end -- cgit v1.2.3