From: Jim Weirich Date: 2003-07-27T07:32:28+09:00 Subject: Re: [ANN] CrossCase-0.01 On Fri, 2003-07-25 at 16:08, Michael Granger wrote: > Hi, > > I'd like to announce the first release of the 'CrossCase' module: a > mixin which auto-generates under_barred aliases for class or instance > methods with names which follow the camelCased naming conventions, and > vice-versa. I did something like this when I was working with a Ruby version of FIT. The FIT tests had to be cross platform (we had teams doing a Java version), so all the FIT tests used cammelCaseStyle names. I wrote a module called JavaNames that when mixed-in to a class would allow the namesLikeThis to automatically try names_like_this. I made the base FIT fixture include JavaNames, so all derived fixture automatically supported tests with Ruby-style names or with Java-Style names. I didn't write aliases, I just revectored using method_missing (performance wasn't an issue for me). -- -- Jim Weirich jweirich@one.net http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)