Raising Errno::ENOENT exception with a particular path instead of src, which may be an array.
Closes #59
This commit is contained in:
parent
3916ffc91d
commit
8bf4b5aeb0
@ -102,7 +102,7 @@ module FakeFS
|
||||
FileSystem.add(dest_path, target.entry.clone)
|
||||
FileSystem.delete(path)
|
||||
else
|
||||
raise Errno::ENOENT, src
|
||||
raise Errno::ENOENT, path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -568,7 +568,6 @@ class FakeFSTest < Test::Unit::TestCase
|
||||
assert_equal ['/path', '/path/bar', '/path/bar/baz', '/path/bar2', '/path/bar2/baz', '/path/foo', '/path/foobar'], Dir['/**/*']
|
||||
|
||||
assert_equal ['/path/bar', '/path/bar/baz', '/path/bar2', '/path/bar2/baz', '/path/foo', '/path/foobar'], Dir['/path/**/*']
|
||||
|
||||
assert_equal ['/path/bar/baz'], Dir['/path/bar/**/*']
|
||||
|
||||
FileUtils.cp_r '/path', '/otherpath'
|
||||
@ -803,6 +802,10 @@ class FakeFSTest < Test::Unit::TestCase
|
||||
assert_raise(Errno::ENOENT) do
|
||||
FileUtils.mv 'blafgag', 'foo'
|
||||
end
|
||||
exception = assert_raise(Errno::ENOENT) do
|
||||
FileUtils.mv ['foo', 'bar'], 'destdir'
|
||||
end
|
||||
assert_equal "No such file or directory - foo", exception.message
|
||||
end
|
||||
|
||||
def test_mv_actually_works
|
||||
|
Loading…
Reference in New Issue
Block a user