From: Francis Hwang Date: 2005-02-17T04:52:41+09:00 Subject: Re: [ANN] FileSystem 0.1.0: Beta for me, Alpha for you On Feb 16, 2005, at 11:44 AM, gabriele renzi wrote: > mh.. but I have the feeling that it /should/ be distracting. > Or, better put, that it should make clear that we're working with a > test facility. Anyway I understand your reason and you're the author > :) Well, it's interesting, I think some of us would like something like this to be really distracting, and others would like it to be completely transparent. The two are pretty opposite in my mind, but I suppose there's no reason I couldn't support both, with an option to use one or the other depending on what files get included. Maybe by default we'd use, say MockFS.file and MockFS.file_utils to get the classes, but then if you wanted you could have your code simply use File and FileUtils, your test code could require 'mockfs/voodoo' or some such file to redefine those constants. I'll have to look into the details. > >> 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. >> Anyway, I'm very very open to suggestions regarding the name and/or >> how to access it. > > just a suggestion, maybe you can take a look at how libvfs (on raa) > does this. Thanks for the tip; I'll definitely take a look. Francis Hwang http://fhwang.net/