in reply to TDD in perl
I've written most of my code in that fashion for a couple of years. It really helps. (When I don't use TDD, I'm either experimenting with something really small to learn, or I'm about to screw up and learn my lesson again.)
You can use Test::Simple (and, even better, Test::More) for both unit (or programmer) and accentance (or customer) tests. The trick for programmer tests is to test individual pieces of your code, probably at the module level, if not the individual function and method level, in isolation, as far as possible. You want to be sure that what you're about to write does what it needs to do.
For programmer tests, you can use the same approach. You just have to think on a bigger scale.
For example, my Mail::SimpleList has a file called acceptance.t. It has just enough code to fake up an incoming message and just enough code to capture outgoing messages. The tests mostly boil down to sending a message a real user might send and testing that the responses are what should really happen. The guts of the modules (or how many modules there are) are hidden from the tests.
|
|---|