From: Pit Capitain Date: 2005-02-17T01:25:38+09:00 Subject: Re: [ANN] FileSystem 0.1.0: Beta for me, Alpha for you Francis Hwang schrieb: > I'm not 100% happy with the current form of access either: Typing > "FileSystem.get_file" when you really just want "File" is sort of > cumbersome. But it just seemed like the least broken thing I could go > forward with while I figured out something else. When we talked about > this at Ruby-NYC a few weeks ago, Patrick was saying I could write a > file to change the definitions of File, FileUtils, Dir, etc. Maybe > that'll be the way to go. It would be nice if you could implement it in this way. Then the code under test would be completely independent from your library. I once used this technique for a Time mock [1] and I liked it very much. Regards, Pit [1] In my tests I had a lot of calls to Kernel#sleep, but I wanted them to run as fast as possible. So I implemented a Time mock where you could change the current time. In the tests, a call to sleep simply adjusted the current time accordingly.