I’m using Test::Rails from ZenTest.
I did an abstract(?) class that inherits from Test::Rails::TestCase and
I wanted to define some general test there to be inherited by my
testcases.
The problem is that when I run my testcase the tests defined in the
avstract class are executed twice: first for the class inheriting from
it and then again for the abstract class.
Supposing there is one test defined in MyTestCase and two defined in
MyAbstractClass the test executed will be 5.
How can I skip the tests in the abstract class?
Till now I resolved setting the following code at the beginning of each
test:
return if self.class == MyAbstracyClass
…but the test are still be counted…
return if self.class == MyAbstracyClass
…but the test are still be counted…
Any idea?
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.