Return true from FakeFS::activate! and ::deactivate!
This commit is contained in:
parent
8ae8692ec7
commit
491da764d1
@ -16,6 +16,7 @@ module FakeFS
|
||||
const_set(:FileUtils, FakeFS::FileUtils)
|
||||
const_set(:FileTest, FakeFS::FileTest)
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def self.deactivate!
|
||||
@ -30,6 +31,7 @@ module FakeFS
|
||||
const_set(:FileTest, RealFileTest)
|
||||
const_set(:FileUtils, RealFileUtils)
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1370,6 +1370,15 @@ class FakeFSTest < Test::Unit::TestCase
|
||||
assert !Pathname.new("bar").exist?
|
||||
end
|
||||
|
||||
def test_activating_returns_true
|
||||
FakeFS.deactivate!
|
||||
assert_equal true, FakeFS.activate!
|
||||
end
|
||||
|
||||
def test_deactivating_returns_true
|
||||
assert_equal true, FakeFS.deactivate!
|
||||
end
|
||||
|
||||
def here(fname)
|
||||
RealFile.expand_path(File.join(RealFile.dirname(__FILE__), fname))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user