Writing a Typo Sidebar Test First In Rails

Posted by paul
Tuesday, August 15, 2006 19:21:55 GMT

UPDATE: Sorry, I pulled the trigger too quickly on this and included some old code that I’d updated. I’m in the process of getting the right code up on Trac, all should be well now though.

I wanted to see how easy it would be to make an extension to the popular Rails application, Typo. Primarily, because I needed some extra functionality myself. Secondly, I thought it would be a nice exercise to write something test-first for an existing application I’ve not developed. This (rather large post) is the result.

The post covers most of my process and thoughts as I was working on the code (I started hacking away whilst on an early morning train journey for work).

Getting the Code

At the moment, I’m hosting the code at a Trac install I’ve put up for the (eventual) component. So far it’s just the Subversion patch file, and some notes for installation.

I’m working on changing it so it can be installed without changes to the Typo code, and packaging it properly but I’m learning so please be patient :) If people have suggestions, feel free to add comments!

Anyway, onto the main event…