I started with ruby about 6 weeks ago. So I am pretty new. The code I
have
contains out of 4 files and works only with a specific underlying
application, which I manipulate through the code. Maybe I am
misuderstanding
the use of assertions. I thought that assertions help raising errors. I
don’t want to run a Unittest. So maybe my approach is wrong?
I removee < Test::Unit::TestCase
Now I get:
TEST FAILED.undefined method `assert’ for #WebAC::BPUtils:0x2c2e270
My code:
#Includes
require ‘test/unit/assertions’
require ‘test/unit’
more code
$clsBPUtils = BPUtils.new
more code
class BPUtils
require ‘test/unit/assertions’
def initialize
# empty
end
def bpVerifyPopupWindowOpen( ieCont, verify)
begin
assert( ieCont.contains_text( verify) )
puts("TEST PASSED. Found test string 'Programming Ruby' ")
rescue => e
puts(“TEST FAILED.” + e.message + “\n” +
e.backtrace.join("\n"))
end
end