aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_tempfile.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-31 04:45:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-31 04:45:10 +0000
commit2608dc0bcdc4f5daa3dc2f403d762d3c7505af85 (patch)
tree5cc2caf7e9d42cb763e82b46eb92eada284b218c /test/test_tempfile.rb
parent2f161285f7ce3005e5f7f59f7be73f26fb05a9b0 (diff)
downloadruby-2608dc0bcdc4f5daa3dc2f403d762d3c7505af85.tar.gz
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
Diffstat (limited to 'test/test_tempfile.rb')
-rw-r--r--test/test_tempfile.rb8
1 files changed, 4 insertions, 4 deletions
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