Aliasing File.readable? to File.exist? so Rack::File can work

This commit is contained in:
Nick Quaranto 2009-09-29 11:00:36 -04:00 committed by Chris Wanstrath
parent 54cc2b7358
commit 166ff444d9
2 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,9 @@ module FakeFS
class << self
alias_method :exists?, :exist?
# Assuming that everyone can read files
alias_method :readable?, :exist?
end
def self.size(path)

View File

@ -94,6 +94,7 @@ class FakeFSTest < Test::Unit::TestCase
end
assert File.exists?(path)
assert File.readable?(path)
end
def test_file_opens_in_read_only_mode