Hello,

In message "[ruby-talk:27153] Re: Small RubyUnit extension"
    on 01/12/01, Dave Thomas <Dave / PragmaticProgrammer.com> 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.
    [<TestFoo#test_foo>, <TestFoo#test_bar>, 
     <TestBar#test_foo>, <TestBar#test_bar>]

> > 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. :-)