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

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.