Masaki Suketa <masaki.suketa / nifty.ne.jp> writes:

> 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>]

How about

   RUNIT::TestCase.test_cases
        #=> [TestFoo, TestBar].


   RUNIT::TestCase.test_methods
       #=> [<TestFoo#test_foo>, <TestFoo#test_bar>, 
            <TestBar#test_foo>, <TestBar#test_bar>]


If you're interested, I have a version of that rubyunit.rb that
incorporates Robert Feldt's regexp matching, along with removal of
duplicate tests, so you can say:

   ruby TestParser /lex/ test_errors test_flex

which runs all tests with lex in the name, as well as
test_errors. test_flex does not get run twice.


Dave