Ruby Testing and Documenting best practice

A little learning project with Ruby and how it manages testing

So this morning I thought I would get stuck into a small learning project.

My first issue was that I wasn't 100% sure how I should be unit testing whatever I write or how I should be documenting it. Some digging around led me to a really useful article called The Unofficial Ruby Guide.  The article has documented some best practice, which I have tried to double check at various other websites and they seem to check out.

The testing functionality that comes built into Ruby seems to be fairly straight forward to use and robust enough for my small script - during my research I found this article discussing the relative pros and cons of it and I am happy enough that Ruby Test::Unit will do the job.

Documenting seems to be done by a great many people using RDoc, again for what I need it to do for this script I see no reason why I shouldn't use it, the syntax seems relatively intuitive and it is built into Netbeans so I can create code documentation whenever I wish.


Recent posts View all

Ruby

Forcing a Rails database column to be not null

How you can force a table column to always have something in it with Rails

Writing Marketing

We've deleted an article's worth of unhelpful words

We've improved several pages across our site by removing words that add no value, and often detract from the article.