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 some information 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

EmailStudents

Unsolicited Hiring Tips

If you're going to email a company out of the blue, help them to help you with these three tips

Reviews

Review: How data happened

A fun read for anyone interested in data or the social history around it