add basic usage to readme
This commit is contained in:
parent
b8e7c5499c
commit
42dc10c505
@ -24,6 +24,30 @@ With FakeFS:
|
|||||||
|
|
||||||
Woot.
|
Woot.
|
||||||
|
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
require 'fakefs'
|
||||||
|
|
||||||
|
# That's it.
|
||||||
|
|
||||||
|
|
||||||
|
Don't Fake the FS Immediately
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
require 'fakefs/safe'
|
||||||
|
|
||||||
|
FakeFS.activate!
|
||||||
|
# your code
|
||||||
|
FakeFS.deactive!
|
||||||
|
|
||||||
|
# or
|
||||||
|
FakeFS do
|
||||||
|
# your code
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
How is this different than MockFS?
|
How is this different than MockFS?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user