Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • The reason I use testing libraries is that I don't want to retype the same code again and again, often badly and incompletely. Test::MockObject grew out of a pattern I noticed myself using in a particular situation, for example.

    Every time I've neglected to treat test code as I would regular code, I've regretted it. It's all code and the normal strategies ought to apply.

  • With tests, it feels like there's two kinds of duplication: repeated test setup or utility code that's more involved with the mechanics of testing, and repeated code that involves the things under test. I usually factor the former into something like Test::Utility. The latter is more problematic. Some of it may be fair game to be moved off into a MyStuff::TestUtilities. The criteria for me, though, is wether the refactoring will reduce the readability of the tests.

    Tests are a form of documentation. As d