Hi,

In <F8E6D5E9-3150-4EF3-9311-3CEC76ACA056 / segment7.net>
  "[ruby-core:17756] Re: Release Plan: Ruby 1.9.0-2" on Mon, 14 Jul 2008 08:08:05 +0900,
  Eric Hodel <drbrain / segment7.net> wrote:

> > It seems that test/unit isn't easy to extend. So miniunit
> > isn't easy to extend. An example is below.
> >
> > e.g. active_support/testing/setup_and_teardown.rb:
> >
> > [...]
> >
> > "ugly hacks" as I said means that overriding existing method
> > with using internal API and aliasing it. Example internal
> > API is add_failure for test/unit case, runner.puke for
> > miniunit.
> >
> > If test/unit and/or miniunit are/is easy to extend,
> > active_support/testing/setup_and_teardown.rb doesn't need to
> > overriding existing run method.

> The ugly hacks Rails makes for test/unit and miniunit would not be  
> necessary if they would create a Rails::TestCase.  This would be very  
> pretty in both test/unit and minunit if they would switch to a  
> subclass and modules to add additional setup and teardown for whatever  
> extras they need.
> 
> Rails has an unhealthy and unnatural fetish of aliasing methods and  
> replacing them instead of using the more-natural inheritance  
> mechanisms ruby provides.

It seems that they want to consider about users. In their
way, users don't need to change parent class of their test
cases. It seems that this is a reasonable reason.


>                            (I believe there would be no difference  
> between miniunit ugly hacks and test/unit ugly hacks using subclassing  
> and modules.)

I think so too. I wanted to say Test::Unit isn't good and
miniunit isn't also good.

> >> Here is a real world (idiomatic) example of test/unit extension vs
> >> miniunit:
> >>
> >> [...]
> >
> > I couldn't understand why test/unit version is:
> >
> >> [...]
> >
> > We can write it same as miniunit version:
> >
> >> [...]
> 
> Perhaps the example was too simplistic.  I have found making a good,  
> user-friendly custom assertion failure message awkward in test/unit.

If you don't need to use lazy assertion failure message
generation same as miniunit, you don't need to use
build_message.


Thanks,
--
kou