From: James Edward Gray II Date: 2006-03-10T02:14:48+09:00 Subject: Re: Test Harness? On Mar 9, 2006, at 10:56 AM, 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 have written test harnesses in Perl using Test::Harness::Straps > that does > exactly what I want - for Perl. Is there a similar library for > Ruby? If > so, I have yet to find it. Making a test suite is trivial. Just add a final like "ts_all.rb" to your test folder that looks something like this: #!/usr/local/bin/ruby -w require "test/unit" require "tc_file_one.rb" require "tc_file_two.rb" # ... __END__ Execute that file to run all of the tests. Hope that helps. James Edward Gray II