When passing the same path for the source and dest e.g. FakeFS::File.rename('/file', '/file'), the file will get deleted by FileSystem.delete(source) then a 0 will get returned.
This is erroneous behaviour, the file '/file' should still exist and the 0 returned. See the example below comparing FakeFS::File.rename with File.rename:
When passing the same path for the
source
anddest
e.g.FakeFS::File.rename('/file', '/file')
, the file will get deleted byFileSystem.delete(source)
then a0
will get returned.This is erroneous behaviour, the file '/file' should still exist and the
0
returned. See the example below comparingFakeFS::File.rename
withFile.rename
: