From 7f601eb7fcebfc4f5a1a4281344180ab21740f6b Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 2 Dec 2009 03:14:32 -0500 Subject: [PATCH] RealFileUtils makes calls to ::File && ::Dir - so we need to deactivate FakeFS if we intend RealFileUtils to use the RealFile and RealDir class. Closes #24 --- test/fakefs_test.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/fakefs_test.rb b/test/fakefs_test.rb index 67ab301..62028e1 100644 --- a/test/fakefs_test.rb +++ b/test/fakefs_test.rb @@ -788,7 +788,9 @@ class FakeFSTest < Test::Unit::TestCase end def test_clone_clones_directories + FakeFS.deactivate! RealFileUtils.mkdir_p(here('subdir')) + FakeFS.activate! FileSystem.clone(here('subdir')) @@ -799,7 +801,10 @@ class FakeFSTest < Test::Unit::TestCase end def test_clone_clones_dot_files_even_hard_to_find_ones + FakeFS.deactivate! RealFileUtils.mkdir_p(here('subdir/.bar/baz/.quux/foo')) + FakeFS.activate! + assert !File.exists?(here('subdir')) FileSystem.clone(here('subdir'))