From: Phlip Date: 2004-03-15T03:49:34+09:00 Subject: Re: [help] unit testing when dealing with files Shashank Date wrote: > > shasckaw wrote: > > Should I use ruby mock? How? Or something else? And then what? > > I will recommend FlexMock for this purpose. You can find FlexMock at: > http://onestepback.org/software/flexmock/ To mock what? Just write a file and run a checksum on it, right? Use a Mock to test. * what time is it * releasing resources * pseudo-random numbers * without really weird side-effects * expensive or slow hardware * modules that depend on modules that don't exist yet, which you can't start * 3rd party modules that can't Get everything they Set * responses to failing system calls. Writing and reading a modern file won't get farther than the memory buffers, so "slow hardware" doesn't apply. -- Phlip http://www.xpsd.org/cgi-bin/wiki?TestFirstUserInterfaces