From: Masaki Suketa Date: 2001-12-01T21:11:49+09:00 Subject: [ruby-talk:27183] Re: Small RubyUnit extension Hello, In message "[ruby-talk:27153] Re: Small RubyUnit extension" on 01/12/01, Dave Thomas writes: > > Does RUNIT::TestCase.all_suite help you? > > Not really, because it returns all the suites, where I need all the > cases in order to be able to select individual test methods. It would > be nice is TestCase made @@all_case available, then I could stop > overriding TestCase.inherited. Sorry, I misunderstanded. class TestFoo < RUNIT::TestCase def test_foo ... end def test_bar ... end end class TestBar < RUNIT::TestCase def test_foo ... end def test_bar ... end end tests = RUNIT::TestCase.all_case In above case, which do you want? (1) tests is array of TestCase class. [TestFoo, TestBar]. or (2) tests is Array of TestCase objects. [, , , ] > > I'll change c2t.rb to create the test script using all_suite. > > I guess I'm wondering why it's necessary to add all the code to the > test case when it can be done with a single require? This means c2t.rb creates test of multi classes. $ c2t.rb Foo Bar class TestFoo < RUNIT::TestCase ... end class TestBar < RUNIT::TestCase ... end But this may be YAGNI. :-)