From: Ryan Davis Date: 2009-05-07T03:03:06+09:00 Subject: Re: Redirecting TestRunner output from console to file On May 6, 2009, at 04:45 , Vadim Dobrovolsky wrote: > Hi guys > > I'm novice both in Ruby and test/unit, so keep it in mind. > > I have the following question: > How can I redirect the Test Runner output from console to some file or > string variable? > > E.g. > I run tests with the following arguments > > io=File.new('results.txt', 'w') > tr=Test::Unit::UI::Console::TestRunner.new(Testcase,"VERBOSE",io) Do the simplest thing that could possibly work: % ruby -Ilib test/test_blah.rb > results.txt