Usage

Don't Fake the FS Immediately

RSpec

The above approach works with RSpec as well. In addition to this you may use the
'use_fakefs' macro to turn FakeFS on and off in a given example group. See
lib/spec_helpers for more details on it's usage.

How is this different than MockFS?

FakeFS provides a test suite and works with symlinks. It's also strictly a
test-time dependency: your actual library does not need to use or know about
FakeFS.

Caveats

FakeFS internally uses the Pathname and FileUtils constants. If you use
these in your app, be certain you're properly requiring them and not counting
on FakeFS' own require.