< Stop the Motion!
Hello, My Ragtime Gal! >

[Comments] (1) Unit Testing The Whole World!: One of the quality control measures I introduced for the Ruby Cookbook was automatically testing the code in the recipes. Most of the recipes contain worked examples, and the examples can be treated as a partial unit test suite for the forgoing code. I wrote doctest-like code that treated those examples like unit tests and used the results to find bugs in the recipes. You can still see the reports linked from the unofficial Ruby Cookbook page.

I think this technique is pretty interesting and I'm really happy with the quality improvements and extra confidence I got out of it. I even considered going to RubyConf and giving a talk about it. But going to RubyConf to give a talk costs me money, money I don't have, whereas writing an article on the same topic would earn me a pitifully small amount of money. I decided to write an article. This is the sort of business acumen that has made me the financial giant I am today.

Now the article's been published: "Unit testing your documentation". Original title was the less-prescriptive "Unit testing a book", which got changed to the even-less-prescriptive "Unit testing the Ruby Cookbook" but now it seems I'm prescripting away! Whee!

Filed under:

Comments:

Posted by Ian Bicking at Thu Sep 07 2006 21:53

Ruby could really use a good doctest -- the Behavior Driven Development guys are going nuts with crazy methodMissing stuff just to do what is dirt simple and easy to understand with doctest.


[Main] [Edit]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.