maung aung wrote:
> Hi,
> When i wrote the following statement and run ruby, i got this message:
> c:/ruby/lib/ruby/1.8/test/unit/testcase.rb:64:in `initialize': wrong number
> of arguments (1 for 3) ArgumentError). When i run without test/unit case, it
> run just fine and no complaints. Could anyone help me with this?
>
>
> require 'watir'
> require 'test/unit'
>
> class Login < Test::Unit::TestCase
>
> def initialize(site, user_name, passwd)
> @site=site
> @user_name=user_name
> @passwd=passwd
> end
> end
>
> myLogin1 = Login.new"www.testing.com", "tester", "pwd")
>
That is not the right way to use test unit.
Depending on what the rest of your code looks like, this might work, though:
require 'watir'
require 'test/unit'
class Login < Test::Unit::TestCase
def setup
@site=$site
@user_name=$user_name
@passwd=$passwd
end
end
$site, $user_name, $passwd = "www.testing.com", "tester", "pwd"
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general