A
Achim Domma
Hi,
I'm experimenting with the dynamic features of ruby to add methods to
a TestCase. Here is my test script:
require 'watir'
require 'test/unit'
class MyTest < Test::Unit::TestCase
end
for num in ["a","b","c"]
MyTest.senddefine_method,"test_" + num) {
assert(false,"->"+num)
}
end
It works fine so far, but all asserts display "->c" as error message.
I don't understand why! Any hint? How to fix it?
regards,
Achim
I'm experimenting with the dynamic features of ruby to add methods to
a TestCase. Here is my test script:
require 'watir'
require 'test/unit'
class MyTest < Test::Unit::TestCase
end
for num in ["a","b","c"]
MyTest.senddefine_method,"test_" + num) {
assert(false,"->"+num)
}
end
It works fine so far, but all asserts display "->c" as error message.
I don't understand why! Any hint? How to fix it?
regards,
Achim