diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index f99d5f62c2..a72cb6bc96 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -51,7 +51,11 @@ class TestFileUtils < Test::Unit::TestCase end def check_have_symlink? - File.symlink "", "" + Dir.mktmpdir do |dir| + Dir.chdir(dir) do + File.symlink "symlink", "symlink" + end + end rescue NotImplementedError, Errno::EACCES return false rescue