diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb index 2ce32a6c12..77958b6359 100644 --- a/test/pathname/test_pathname.rb +++ b/test/pathname/test_pathname.rb @@ -616,7 +616,7 @@ class TestPathname < Test::Unit::TestCase def test_kernel_open count = 0 result = Kernel.open(Pathname.new(__FILE__)) {|f| - assert(File.identical?(__FILE__, f)) + assert_file.identical?(__FILE__, f) count += 1 2 } @@ -1298,18 +1298,18 @@ class TestPathname < Test::Unit::TestCase def test_mkdir with_tmpchdir('rubytest-pathname') {|dir| Pathname("d").mkdir - assert(File.directory?("d")) + assert_file.directory?("d") Pathname("e").mkdir(0770) - assert(File.directory?("e")) + assert_file.directory?("e") } end def test_rmdir with_tmpchdir('rubytest-pathname') {|dir| Pathname("d").mkdir - assert(File.directory?("d")) + assert_file.directory?("d") Pathname("d").rmdir - assert(!File.exist?("d")) + assert_file.not_exist?("d") } end @@ -1372,16 +1372,16 @@ class TestPathname < Test::Unit::TestCase def test_mkpath with_tmpchdir('rubytest-pathname') {|dir| Pathname("a/b/c/d").mkpath - assert(File.directory?("a/b/c/d")) + assert_file.directory?("a/b/c/d") } end def test_rmtree with_tmpchdir('rubytest-pathname') {|dir| Pathname("a/b/c/d").mkpath - assert(File.exist?("a/b/c/d")) + assert_file.exist?("a/b/c/d") Pathname("a").rmtree - assert(!File.exist?("a")) + assert_file.not_exist?("a") } end @@ -1389,10 +1389,10 @@ class TestPathname < Test::Unit::TestCase with_tmpchdir('rubytest-pathname') {|dir| open("f", "w") {|f| f.write "abc" } Pathname("f").unlink - assert(!File.exist?("f")) + assert_file.not_exist?("f") Dir.mkdir("d") Pathname("d").unlink - assert(!File.exist?("d")) + assert_file.not_exist?("d") } end @@ -1417,7 +1417,7 @@ class TestPathname < Test::Unit::TestCase end def test_file_fnmatch - assert(File.fnmatch("*.*", Pathname.new("bar.baz"))) + assert_file.fnmatch("*.*", Pathname.new("bar.baz")) end def test_relative_path_from_casefold