inheriting tests in testcases

I don't know how zen test differs from the Test::Unit stuff that comes as standard with ruby, but
we had a similar situation with that and ended up putting the common stuff in a module which we included where appropriate.

Fred

I'd use mixins too, but if it's too late:

require 'active_support'
require 'test/unit'

class << Test::Unit::TestCase
  def abstract
    @abstract = true
  end

  def suite_with_abstract
    if @abstract
      Test::Unit::TestSuite.new
    else
      suite_without_abstract
    end
  end
  alias_method_chain :suite, :abstract
end

class AbstractTests < Test::Unit::TestCase
  abstract

  def test_a
    assert true
  end
end

class RealTests < AbstractTests
end

class MoreRealTests < AbstractTests
end