Re: [Wtr-general] Need advice on assert, module/class setup, and Watir

2005-08-22 Thread Warren Pollans
Hello, I have a similar problem/confusion. My assertions are contained in instance methods of classes defined in an external file - so I don't think the suggestion below is applicable - at least it didn't work when I tried it. The page I'm testing has 4 forms - forms 1 and 4 are nearly identical

Re: [Wtr-general] Need advice on assert, module/class setup, and Watir

2005-08-22 Thread Bret Pettichord
This is a hard problem, that i'm still looking for a good answer. I've spent time investigating it. The problem is that there are two different versions of add_assertion, the method that updates the assertion count. One of them is in Test::Unit::TestCase -- and it is what you get if you do

Re: [Wtr-general] Need advice on assert, module/class setup, and Watir

2005-08-20 Thread Bret Pettichord
I suggest that you put your library methods in a Module. Thus: # library.rb module MyLibrary def my_library_method(arg) # code... end end # tests.rb require 'test/unit' require 'library.rb' class TC1 Test::Unit::TestCase include MyLibrary def test_method my_library_method