Monthly Archives: September 2014

Code Coverage — a simple Rails example

My tests are my safety net. With them I can refactor with confidence, knowing that I’m keeping the functionality I intended. With them, I can grow my codebase, knowing that I’m not introducing regression errors. How do I have confidence that my safety net is good enough? One metric I can use to help with this […]

Posted in Agile Software Development, Continuous Integration, Engineering, Quality Software, Rails, Ruby, Software Craftsmanship, Test Driven Development | Leave a comment

Getting Growl notifications from your Virtual Machine

As I develop I have Guard running in the background, executing my tests when things change. But I often don’t have the Terminal window front and centre, so I like to have Growl notifications for my test results. Setting up Growl to push notifications from the Virtual Machine to the host is a little tricky, so here’s a […]

Posted in Agile Software Development, Engineering, Quality Software, Rails, Ruby, Software Craftsmanship, Test Driven Development | 1 Response

Using Spring with RSpec and Guard to speed up testing

In my last post I showed you how to setup Guard and RSpec so you can automatically run tests when things change. Now lets get things cooking on gas by using the Spring application preloader. This will mean that your app framework will only have to load once, and tests will be super zippy. Setting up […]

Posted in Agile Software Development, Engineering, Rails, Ruby, Software Craftsmanship, Test Driven Development | Leave a comment

Getting Started with Guard and RSpec

"Detroit Publishing Co. - A Yeoman of the Guard (N.B. actually a Yeoman Warder), full restoration" by Adam Cuerden, Detroit Publishing Company - http://www.loc.gov/pictures/item/2002696943/. Licensed under Public domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Detroit_Publishing_Co._-_A_Yeoman_of_the_Guard_(N.B._actually_a_Yeoman_Warder),_full_restoration.jpg#mediaviewer/File:Detroit_Publishing_Co._-_A_Yeoman_of_the_Guard_(N.B._actually_a_Yeoman_Warder),_full_restoration.jpg

As I build out an application I want to ensure it’s behaving as I intend it. RSpec is a great framework for testing Ruby code, and is the tool I use most for my testing. But tests are pretty useless if you don’t run them, and rather than manually run tests when I change things, […]

Posted in Agile Software Development, Engineering, Quality Software, Rails, Ruby, Software Craftsmanship, Test Driven Development | 3 Responses