Permalink
Browse files

Added basic File#to_path support (Closes #92)

  • Loading branch information...
1 parent a0e02ed commit 14367140a32752ff44d4ab4afde340a5c58b8298 @rmm5t rmm5t committed with smtlaissezfaire Jul 28, 2011
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/fakefs/file.rb
  2. +6 −0 test/fakefs_test.rb
View
@@ -358,7 +358,7 @@ def close_on_exec?
end
def to_path
- raise NotImplementedError
+ @path
end
end
View
@@ -1663,5 +1663,11 @@ def test_autoclose
assert_equal false, f.autoclose?
end
end
+
+ def test_to_path
+ File.new("foo", 'w') do |f|
+ assert_equal "foo", f.to_path
+ end
+ end
end
end

0 comments on commit 1436714

Please sign in to comment.