From: Ryan Davis Date: 2006-05-23T03:38:51+09:00 Subject: Re: Test::Unit Patch that allows test methods to be executed sequentially On May 22, 2006, at 11:31 AM, bpettichord@gmail.com wrote: > Ryan Davis said: >> Why not subclass TestCase and create SequentialTestCase or >> WatirTestCase? I don't see any reason why this functionality needs to >> be folded into test/unit but I see your argument for Watir. We should >> be trying our damnedest to make test/unit thinner, not thicker. > > Unfortunately, subclassing TestCase is not a good idea. All subclasses > of TestCase are presumed to be concrete tests and you will get errors > if the subclass does not have a test method. (Try it out if you don't > believe me.) There is no provision for "Virtual" testcases, which is > what we would want here. I do it all the time. The simple solution is to put a "test_dummy" in the superclass. Really not hard and a fair tradeoff to have the right code in the right place. > I think the ideal solution would be to refactor the TestCase code > along > the lines of this patch, and thereby expose > TestCase.sorted_test_methods so that it could then be overlayed by > Modules. I disagree. As I said before, we need less code, not more. (I do wholly agree that test/unit needs refactoring, but to make it thinner not thicker) -- ryand-ruby@zenspider.com http://www.zenspider.com/seattle.rb - Seattle.rb http://blog.zenspider.com/