Matt Armstrong <matt / lickey.com> writes:

> >      def initialize(*args)
> >        super
> >
> >        overall_setup do
> >          x
> >          y
> >        end
> >
> >        per_test_setup do
> >          a
> >          b
> >        end
> >      end
> >
> >      def test_...
> >
> > That makes it explicit.
> 
> Believe it or not, I've used inheritance and done things like call
> super from within set_?up/tear_?down methods.  Making setup
> non-methods makes that harder I would think, or at least forces me to
> use some other mechanism to accomplish what the language already has a
> good solution for.

Nothing stops you from using inheritance here - the per_test_setup and
overall_setup methods just have to be clever enough to chain
initializers.


Dave