More accurate test for File.file?
This commit is contained in:
parent
94afbcabc1
commit
57d02ab8b2
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user