From: Tim Pease Date: 2007-08-16T07:00:37+09:00 Subject: Re: Unit tests and destructive methods On 8/15/07, darren kirby wrote: > Hello all, > Cheers! > > I am thinking that I need to write code which makes a copy of the reference > file, write the changes, read the copy to ensure the changes were written > correctly, then delete the copy. > That is one option. You could also look into mockfs -- it's a Ruby library that creates a mock file system in memory, and fakes out the Ruby kernel into using that for File.open, etc. http://mockfs.rubyforge.org/ Blessings, TwP