ruby-changes:41391
From: nobu <ko1@a...>
Date: Fri, 8 Jan 2016 17:23:45 +0900 (JST)
Subject: [ruby-changes:41391] nobu:r53463 (trunk): test_tempfile.rb: use assert_file
nobu 2016-01-08 17:24:01 +0900 (Fri, 08 Jan 2016) New Revision: 53463 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53463 Log: test_tempfile.rb: use assert_file * test/test_tempfile.rb (test_create_with{,out}_block): use assert_file for descriptive failure messages. Modified files: trunk/test/test_tempfile.rb Index: test/test_tempfile.rb =================================================================== --- test/test_tempfile.rb (revision 53462) +++ test/test_tempfile.rb (revision 53463) @@ -329,18 +329,18 @@ puts Tempfile.new('foo').path https://github.com/ruby/ruby/blob/trunk/test/test_tempfile.rb#L329 path = nil Tempfile.create("tempfile-create") {|f| path = f.path - assert(File.exist?(path)) + assert_file.exist?(path) } - assert(!File.exist?(path)) + assert_file.not_exist?(path) end def test_create_without_block path = nil f = Tempfile.create("tempfile-create") path = f.path - assert(File.exist?(path)) + assert_file.exist?(path) f.close - assert(File.exist?(path)) + assert_file.exist?(path) ensure f.close if f && !f.closed? File.unlink path if path -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/