I am new to unit testing, but try this:
 
assert(ie.contains_text("verification text"), "TEST FAILED.")

assert(boolean, [ message ] ) - Fails if boolean is false or nil.

"rescue" seems to rescue your failure.

Zeljko
________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel Kurtz
Sent: Tuesday, July 26, 2005 3:51 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Script return values


I'm confused. This is my script, pretty much copied out of the user guide:

begin
     assert(ie.contains_text("verification text") )
     puts("TEST PASSED.")
rescue 
     puts("TEST FAILED.") 
end

This is what the last couple of lines of output look like:

Go to the test site: http://search.msn.com <http://search.msn.com> 
TEST PASSED.
Go to the test site: http://www.findit-quick.com
<http://www.findit-quick.com> 
TEST FAILED.
Go to the test site: http://www.truesearch.com <http://www.truesearch.com> 
TEST PASSED.
Go to the test site: http://www.waply.com/ <http://www.waply.com/> 
TEST FAILED.
.
Finished in 112.515 seconds.
1 tests, 19 assertions, 0 failures, 0 errors

Why does the framework-generated text at the end not indicate that
assertions failed? How do I capture that info?

Daniel Kurtz
Consultant
Olenick & Associates
205 W. Wacker Drive
Suite 2010
Chicago, IL 60606
312-332-0096
www.olenick.com


_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to