From: "R. Mark Volkmann" Date: 2005-07-01T01:02:36+09:00 Subject: Re: running unit tests in graphical mode Quoting Pit Capitain : > > Quoting Joe Van Dyk : > >>>> > >>>>Currently, the file that runs all the unit tests looks something like > >>>>(from memory) > >>>> > >>>>Dir["tests/*.rb].each { |file| require file } > >> > >>That one line is all that's in unit_tests.rb, which I run with 'ruby > >>unit_tests.rb'. > >> > >>It's very nice not to have to do any other crufty setup-type things to > >>run unit tests. And so my question was how can I easily modify my > >>current way of unit tests to run tests in a graphical mode. > > Just run your file with > > testrb -rt unit_tests.rb > > I'm doing more or less the same and it works for me. Wow! I wasn't aware of testrb. So there's no need to create a Ruby source file that pulls all the test source files into a single file. You can just write separate unit test files and execute them all with testrb [-rtk] *.rb If your unit tests are in a test directory that is a sibling directory of a lib directory where the source files being tested are stored then you may want to run the tests from the lib directory like this. testrb [-rtk] ../test/*.rb This allows the unit tests to require the source files they test without specifying the path to them. -- R. Mark Volkmann Partner, Object Computing, Inc.