FakeFS block form seems a part of base.

This commit is contained in:
Matt Freels 2009-07-27 10:45:56 -07:00
parent 91de901bab
commit 9fb29f122d
2 changed files with 9 additions and 7 deletions

View File

@ -28,4 +28,12 @@ module FakeFS
const_set(:FileUtils, RealFileUtils)
end
end
end
end
def FakeFS
return ::FakeFS unless block_given?
::FakeFS.activate!
yield
::FakeFS.deactivate!
end

View File

@ -9,9 +9,3 @@ require 'fakefs/fileutils'
require 'fakefs/file'
require 'fakefs/dir'
def FakeFS
return ::FakeFS unless block_given?
::FakeFS.activate!
yield
::FakeFS.deactivate!
end