Gerard Meszaros wrote a wonderful book on refactoring tests -
xUnit Test Patterns (
amazon link)
He lists code smells:
- Eager Test (testing too much at once)
- Conditional Test Code (he suggests limiting the use of "if" in tests)
- Obscure Test (what is being tested?)
- Test Code Duplication
At $work I cleaned up our test suite just a bit, removing eager tests, conditional logic and obscure tests. I haven't use Test::Class.
Meszaros says test could should be drop dead simple.