More accurate test for File.file?

This commit is contained in:
Pat Nakajima 2009-06-12 18:16:16 -04:00
parent 94afbcabc1
commit 57d02ab8b2
2 changed files with 2 additions and 2 deletions

View File

@ -129,7 +129,7 @@ module FakeFS
path.entry.is_a? MockFile
else
result = FileSystem.find(path)
result && result.entry.is_a?(MockFile)
result ? result.entry.is_a?(MockFile) : false
end
end

View File

@ -134,7 +134,7 @@ class FakeFSTest < Test::Unit::TestCase
end
def test_knows_non_existent_files_arent_files
assert ! File.file?('does/not/exist.txt')
assert_equal RealFile.file?('does/not/exist.txt'), File.file?('does/not/exist.txt')
end
def test_can_chown_files