How to test code blocks in documentation (opens in new tab)
As any developer, I don’t like to write documentation. But if I am writing it, I would like to test that what I wrote works. I often found myself copy-pasting something from documentation and trying to run it in the terminal (commands, files, etc.), and it didn’t work. There are usually some environment, typos, or even wrong commands in the doc (that people copy-pasted from the wrong place). I know that issue, and after writing the documentation, I usually try to clean up everything in my env...
Read the original article