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 Rails

Removing fields with a Rails migration

Ruby on Rails gives you powerful tools to make removing old fields easy, lets walk through how we can do this

JavaScript

Calculating Instagram Velocity From Your Browser

A small script that lets you quickly work out the velocity for posts within a hashtag