From: Ross Bamford Date: 2006-03-10T04:37:38+09:00 Subject: Re: Test Harness? On Fri, 2006-03-10 at 01:56 +0900, Troy Denkinger wrote: > I'm starting to feel my way around in Ruby after having been a Perler for a > very long time. I'm trying to figure out how to write a proper test harness > in Ruby and so far I'm running up against a brick wall. All my classes have > good unit tests using Test::Unit. However, I want to create a harness that > I can use to run all of the unit tests at a go and give me a success/failure > report across all tests. Every time I make a significant change I have to > remember to run all my unit tests, which is error prone. I see you've had plenty of suggestions, but heres yet another variation: $ ruby -e "Dir['test/tc*.rb'].each { |tc| require tc }" Loaded suite -e Started ....................................... Finished in 0.25893 seconds. 39 tests, 101 assertions, 0 failures, 0 errors That 'Loaded suite -e' thing is a shame though... -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk