From: Mohammad Khan Date: 2004-11-16T01:18:29+09:00 Subject: Re: Starter question on Test::Unit On Mon, 2004-11-15 at 10:55, Henrik Horneber wrote: > > > > > > If I run the above script without any option, would #setup be executed twice, once for #test_run and once for #test_rerun. > > Just to be nitpicky, you would get errors about Foo not being defined ... :) :-) > > I guess you meant: > > require "test/unit" > > class TestClass < Test::Unit::TestCase > > def setup > puts "in setup" > end > > def test_run > assert_equal(true, true) > end > > def test_rerun > assert_equal(true, true) > end > > end > I am confused about the '.' before the on second output 'in setup'. what does that '.' mean? Going back to my original example. If I want to use @foo, @run, @rerun (already initiated) in #test_rerun, what should I do? Or, is there any convention something like, #setup_run (would be used by only #test_run) or #setup_rerun (would be used by only #test_rerun) Henrik, Thanks for you reply. -- Mohammad > > outputs: > > >ruby test_setup.rb > Loaded suite test_setup > Started > in setup > .in setup > . > Finished in 0.0 seconds. > > 2 tests, 2 assertions, 0 failures, 0 errors > >Exit code: 0 > > > Does that answer your question? :) > > regards, > Henrik