Redirecting TestRunner output from console to file

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?

I run tests with the following arguments‘results.txt’, ‘w’),“VERBOSE”,io)

So Test IO should write to io variable but indeed it doesn’t contain any
test results.
Ruby global variable $stdout is also empty. So it seems strange for me.

If you know what’s wrong with my code and assumptions or some other way
how to get test results please answear.

Thank you in advance.

On May 6, 2009, at 04:45 , Vadim Dobrovolsky wrote:‘results.txt’, ‘w’),“VERBOSE”,io)

Do the simplest thing that could possibly work:

% ruby -Ilib test/test_blah.rb > results.txt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs