diff --git a/lib/fakefs/fileutils.rb b/lib/fakefs/fileutils.rb index d991f65..6c00888 100644 --- a/lib/fakefs/fileutils.rb +++ b/lib/fakefs/fileutils.rb @@ -30,6 +30,12 @@ module FakeFS raise Errno::EEXIST, path if FileSystem.find(path) FileSystem.add(path, FakeSymlink.new(target)) end + def ln_sf(target, path) + FileSystem.delete(path) + FileSystem.add(path, FakeSymlink.new(target)) + end + + def cp(src, dest) dst_file = FileSystem.find(dest)