Added basic File#to_path support (Closes #92)

This commit is contained in:
Ryan McGeary 2011-07-27 21:59:56 -04:00 committed by Scott Taylor
parent a0e02ed974
commit 14367140a3
2 changed files with 7 additions and 1 deletions

View File

@ -358,7 +358,7 @@ module FakeFS
end end
def to_path def to_path
raise NotImplementedError @path
end end
end end

View File

@ -1663,5 +1663,11 @@ class FakeFSTest < Test::Unit::TestCase
assert_equal false, f.autoclose? assert_equal false, f.autoclose?
end end
end end
def test_to_path
File.new("foo", 'w') do |f|
assert_equal "foo", f.to_path
end
end
end end
end end