Everyone loves a good example in the documentation. Often, in the software world, the example is code.
But does that example code actually work? If it did work at some point in the past, does it still work?
The only way to know for sure is to run it!
Over at my GitHub project, RubyTest, I’m building a tester ‘tour’ of part of the project. Each ‘stop’ in the tour consists of a small test (code) and its output (a log).
Each time I do a build of the tour, the build procedure executes each test and captures its refreshed log. These are both plugged into a text file that becomes the markdown page for a tour stop.
So I always know that the test code still works!
Check it out: