It's not really a Watir thing more of a test unit issue. You just need to
require 'test/unit/assertions' and may want to include the Assertions
module.
Something like the following:
So it's
===========================================
require 'includeFirst'
require 'test/unit' #is this a test class? if so you should
require this and inherit from TestCase most likely
$x = MyStuff.new
class TC_blah < Test::Unit::TestCase # inherit from TestCase
def test_blah
$x.verifyAndGo("blah")
end
end
========================================
and inside includeFirst.rb
========================================
require 'watir'
#require 'test/unit'
require 'test/unit/assertions' # require the assertions library
class MyStuff
include Test::Unit::Assertions # include this module now you have
assertions as a mixin
def verifyAndGo(linkName)
assert($ie.link(:text, linkName).exists?)
$ie.link(:text, linkName).click
end
end
========================================
Hopefully that makes sense.
-Charley
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general