[Wtr-general] I am having problems with assert -- undefined method `assert'
Eva
forum-watir-users at openqa.org
Mon Oct 9 19:03:54 EDT 2006
Hi,
I used the following assert script from the logger example (test_logger1.rb)
begin
assert($ie.contains_text("Client") )
$logger.log("Passed. Found test string 'Client' ")
$logger.log_results("Employee Tests", "TEST PASSED.") #logs to both the XML file and corelogger
rescue => e
$logger.log("*FAILED*." + e.message + "\n" + e.backtrace.join("\n"))
$logger.log_results("Employee Tests", "TEST FAILED.") #logs to both the XML file and corelogger
end
I receive this error
*FAILED*.undefined method `assert' for main:Object
I tried putting the same script into one of the class methods that I'm using and have the same issue. I have require 'test/unit' in the script. Has anyone seen this issue before?
I'm able to get assert to work when I'm not using classes. Also, I have no problem when using if $ie.contains_text, else, end with the logger.
Thanks.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4722&messageID=13040#13040
More information about the Wtr-general
mailing list