From: James Davis Date: 2003-03-01T06:05:43+09:00 Subject: Test Unit help I'm new to unit testing, and test-first development. Sometimes I would like to run tests from within other tests rather than recoding and maintaining a test in two places. Sometimes it helps to pass in an argument as shown below. In Test::Unit 0.1.4, the first example test_do_some_work(w=@worker) worked fine, but the second test_do_more_work(w=@worker) failed to run. Now, in 0.1.8, both fail to run. I'm using ruby 1.6.8 on Windows. Questions: Is this behavior by design? Why? Is it a bad idea to do what I am trying? Thanks, require 'test/unit' require 'work.rb' class TC_Work < Test::Unit::TestCase def setup @worker = Worker.new end def test_do_some_work(w=@worker) s = 'a' i = 25 assert_equal('abcdefghijklmnopqrstuvwxyz', w.do_some_work(s, i)) end def test_do_more_work(w=@worker) s = 'abc' i = 4 assert_equal('zbczbczbczbc', w.do_more_work(s, i)) end end Jim Davis