Ofer Nave wrote:
Well, I'm just starting to write tests now. Once I'm comfortable with that, in the future I can try writing the tests first. But the module is already written, and I've already posted it many other places to get feedback on design and implementation. It's not very complicated, and I'm comfortable with it as it stands. All that remains now is writing proper tests. I am using it in production already, so it doesn't have any *obvious* bugs. :)

Sorry, I didn't mean to sound critical. Given that it's written, it's great that you're looking to write "proper tests".


I was making more of an aside that an advantage of test-first design means that one winds up writing what one expects in a formal way up front, which both adds clarity but also saves one from later agonizing (or, for some, procrastinating) over how to write a test to confirm that what one has written and *thinks* works really works.

In your case, your code is already written, but I was suggesting that you think through the tests not from the perspective of testing your *code*, but testing your *features* -- as if you were starting from scratch and hadn't written any code.

Thanks for the lead on Test::Output!

You're welcome!

Regards,
David Golden

Reply via email to