require 'test/unit/assertions'
include Test::Unit::Assertions
Note that doing this will end up not having these assertions show up in the assertion count you get when you run the tests.
Bret
On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
I'm calling a class from a file within a loop in separate file from my test script. The objective is to iterate through my script n... number of times. The call from the loop works fine, but the asserts in the in my test script are not workingHere is my loop that lives in a separate file:require 'cdd_154'$aaa=001; $aaaa=10;
@temp = CDD_154.newfor $aaa in ($aaa..$aaaa)
@temp.test_questions
endHere is my class in my test script:#includes:
require 'watir'
#test::unit requires
require 'win32ole' # to read from a spreadsheet
require 'test/unit'
require 'test/unit/testcase'
require 'test/unit/autorunner'
require 'watir'
require 'watir/testUnitAddons'$test_site = 'http://www.testsite.com'class CDD_154 < Test::Unit::TestCase
def initialize()
end
def test_questionsthen comes my code with some assetionsendThis the error I get one it reaches my first assertc:/ruby/lib/ruby/1.8/test/unit/testcase.rb:115:in `add_assertion': undefined met
hod `add_assertion' for nil:NilClass (NoMethodError)
from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:353:in `_wrap_assertio
n'
from c:/ruby/lib/ruby/1.8/test/unit/assertions.rb:38:in `assert'
from ./cdd_154.rb:59:in `test_questions'
from C:/_Watir/examples/tester1.rb:10
from C:/_Watir/examples/tester1.rb:9:in `each'
from C:/_Watir/examples/tester1.rb:9Any ideas on what I'm doing wrong?David Solis
WELLS FARGO PCS TECHNOLOGY -
( Phone: (415) 267-0154
( Cell: ( 415) 385-3286
MAC: A0103-241
8 Email: [EMAIL PROTECTED]
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
