From: Jesse Jones Date: 2001-12-19T23:46:46+09:00 Subject: [ruby-talk:28917] Re: Yet Another Unit Test Framework In article <3C1F34AC.95A11186@stud.ntnu.no>, Kent Dahl wrote: > Jesse Jones wrote: > > One of the first things I did was write a unit testing framework. I > > think it turned out really well: it's very easy to use and seems a > > lot simpler than rubyunit. I'm curious to know what more experienced > > Ruby programmers think about it so I'll present it here. Feel free > > to point out any areas that could be improved (even stylistic issues). > > I've only had a quick glance, but here are the reasons I won't be moving > away from RubyUnit to your: > > - class methods used for test methods? > Feel a little un-OO-ish. Most tests are fundamentally pretty simple: you create one or more objects, call some methods, and verify that the object state is what you expected. There's no need to create a whole new class to do this, a class method is more than adequate. The goal should be to make simple things simple and complex things possible. Forcing people to create custom classes for each unit test doesn't strike me as simple. > - strings for selecting tests. > With the nice reflection of Ruby, > it is easy to grab all the methods that start with "test_", I don't understand this one. I am using reflection to find the unit test methods. That's how UnitTest::doTest figures out which methods to call. > - I'm a sucker for standarization, and the *Unit frameworks' > crosslanguage similarities appeal to me. I always thought they were over designed. :-) But I confess that I haven't examined them closely enough. -- Jesse