Close and Go BackBack to Viget

Hackday: Effective Testing for Rails

Patrick Reagan
Patrick Reagan, Development Director, September 28, 2009 0

This past Saturday we hosted the second Hackday at the Viget Labs office (photos). For this event, Matt and I focused on the tools and techniques for testing that we often use when developing Rails applications. Since the Hackday format is one of collaborative teaching and discussion, we decided to build a micro-app from scratch during a pair-programming session.

Pairing

The topic for the day was a logical progression from our previous event on controller refactoring as testing is a critical component of any reliable refactoring activity. We spent some time covering the standard testing facilities in Rails and went on to discuss mocking, stubbing, object factories, and other testing libraries for use in Ruby and Rails projects.

The three-hour timeframe was sufficient to scratch the surface of these topics, but didn't allow us to get too deep in any one area. In order to bridge the gap between what we covered during the day and the final application, we've made the full application code and tests available on GitHub. We've also provided a list of links to some of the tools we discussed during the day.

Thanks to everyone who came out to the event – we hope to see you all at the next Hack Night.

Name:

Email:

URL:

Not an infant or robot? Please prove it:
How many minutes in an hour?

Some HTML (strong, a, em) is allowed.

Notify me of follow-up comments?

We're the Developers

at Viget Labs. We write about web development trends, tips, best practices, industry events, and our projects — all with an emphasis on Ruby on Rails.

Recent Comments

I wonder how much it compares to the Adobe Spry library that is heavily focused on data handling. labs.adobe.com/technologies/spry/

Contact Us

Have any questions, comments, ideas, or secrets to share? Let us know.


How many minutes in an hour?

Sorry, you need to have Javascript enabled to use this form. (Don't blame us, blame the spammers!) If you'd like to contact us, please visit our Contact page.