Closed mikz closed 9 years ago
Well, FakeFS overrides several classes including FileUtils
. This kind of override is problematic when you rely on real behavior from this kind of tool.
For instance, try testing the following with FakeFS ;)
FileUtils.touch('somefile.txt', noop: true)
This kind of option is totally ignored :(
MemFs tries to be compliant with the Ruby API by overriding only the low level classes (C classes) like File
, Dir
or File::Stat
leaving the stdlib classes untouched and still working, being less intrusive that way :)
Another key point is that MemFs aims to implement every single method provided by Ruby classes (including IO
ones for File
when possible) and to behave and return exactly the same way as the original classes.
I'll try to add those details to the README. I'll keep your issue open to remind me ;) Thank you!
Now it makes sense. Thanks!
Awesome :)
It's now part of the README. Thanks ;)
Why one should use MemFS over FakeFS ? What are the benefits? I believe this should be described in the README.
The target is to be 100% compliant with Ruby APIs, but FakeFS is not?