summaryrefslogtreecommitdiff
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
commit33604da3f68213b7bdb52c3e8af5767fbc5af79b (patch)
tree5cc2caf7e9d42cb763e82b46eb92eada284b218c /test/test_tempfile.rb
parent56ef54338b7ad3df962190d5a6aaab7f100d2ea6 (diff)
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