Skip to content

Commit

Permalink
Add a caveat about Dir.pwd in v0.4.x vs v0.5.x.
Browse files Browse the repository at this point in the history
  • Loading branch information
eventualbuddha committed Jan 17, 2014
1 parent b3f6b04 commit 4dcf8a7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.markdown
Expand Up @@ -59,7 +59,8 @@ end
Rails
-----

If you are using fakefs in a rails project with bundler, you'll probably want to specify the following in your Gemfile:
If you are using fakefs in a rails project with bundler, you'll probably want
to specify the following in your Gemfile:

``` ruby
gem "fakefs", :require => "fakefs/safe"
Expand Down Expand Up @@ -116,6 +117,15 @@ 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.

As of v0.5.0, FakeFS's current working directory (i.e. `Dir.pwd`) is
independent of the real working directory. Previously if the real working
directory were, for example, `/Users/donovan/Desktop`, then FakeFS would use
that as the fake working directory too, even though it most likely didn't
exist. This caused all kinds of subtle bugs. Now the default working directory
is the only thing that is guaranteed to exist, namely the root (i.e. `/`). This
may be important when upgrading from v0.4.x to v0.5.x, especially if you depend
on the real working directory while using FakeFS.


Speed?
------
Expand Down

0 comments on commit 4dcf8a7

Please sign in to comment.