defunkt/fakefs — pull request #240 by paologianrossi (2014-06-07 13:43:12+00:00)
Title: Make File#rename work as expected

Standard Ruby File class #rename raises Errno::ENOENT if the destination directory does not exist.

```
irb(main):003:0>
irb(main):003:0> File.open("/tmp/test", "w") { |f| f.write("hello") }
=> 5
irb(main):004:0> File.rename("/tmp/test", "/tmp/dir/test")
Errno::ENOENT: No such file or directory - /tmp/test or /tmp/dir/test
from (irb):4:in `rename'
from (irb):4
from :0
irb(main):005:0>
```

This patch implements this edge behaviour in FakeFS.