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 working
 
Here is my loop that lives in a separate file:
 
require 'cdd_154'
$aaa=001; $aaaa=10;
@temp = CDD_154.new
for $aaa in ($aaa..$aaaa)
 @temp.test_questions
 end
 
Here 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_questions
 
     then comes my code with some assetions
 
end
 
This the error I get one it reaches my first assert
c:/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:9
 
Any 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

Reply via email to