At 02:10 PM 10/6/2005, Chris McMahon wrote:
>What I really want to do is grab STDOUT (or whatever) generated from
>assert_equal, stick it in a variable, and use Watir to write the
>contents of that variable to a "test results" page on the WEA wiki.

Take a look at unittests/iostring.rb and the tests that use it. I created 
this so that i could test the "show" methods to make sure they were 
printing the right thing to stdout. They redirect STDOUT to a string-like 
object that i could query against. This instruments at the test case level, 
but you want to instrument at the suite level. So you'll have more work to 
do, but this should get you headed in the right direction.

Since the normal use of test/unit depends on it to create a default test 
runner in an END block, you'll want to add code that, first redirects (or 
tees) stdout, and then creates another END block to write out this 
string-thing to the wiki. That END block will have to be defined before 
test/unit is loaded, so that it will run after it.

Bret

_____________________
  Bret Pettichord
  www.pettichord.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to