Hum, how did that test pass last night?

This commit is contained in:
Jeff Hodges 2009-05-31 22:41:11 -07:00
parent 4f6259d180
commit 4de717a976

View File

@ -290,8 +290,9 @@ class FakeFSTest < Test::Unit::TestCase
def test_clone_clones_normal_files def test_clone_clones_normal_files
def here(fname); File.expand_path(File.dirname(__FILE__)+'/'+fname); end def here(fname); File.expand_path(File.dirname(__FILE__)+'/'+fname); end
RealFile.open(here('foo'), 'w'){|f| f.write 'bar' } RealFile.open(here('foo'), 'w'){|f| f.write 'bar' }
assert !File.exists?(here('foo'))
FileSystem.clone(here('foo')) FileSystem.clone(here('foo'))
assert_equal 'bar', File.open('foo'){|f| f.read } assert_equal 'bar', File.open(here('foo')){|f| f.read }
ensure ensure
RealFile.unlink(here('foo')) if RealFile.exists?(here('foo')) RealFile.unlink(here('foo')) if RealFile.exists?(here('foo'))
end end