Category Archives: Ruby

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 […]

Also posted in Agile Software Development, Continuous Integration, Engineering, Quality Software, Rails, 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 […]

Also posted in Agile Software Development, Engineering, Quality Software, Rails, 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 […]

Also posted in Agile Software Development, Engineering, Rails, 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, […]

Also posted in Agile Software Development, Engineering, Quality Software, Rails, Software Craftsmanship, Test Driven Development | 3 Responses

Compiling Ruby from source for your development environment

For most of us, downloading the development package of Ruby for your platform will suffice. For the curious, or those needing a Ruby version that doesn’t have a pre-built package available you have to resort to compiling ruby from source code. Fortunately, as we have built ourselves a clean development environment using Vagrant, this is […]

Also posted in Engineering, Rails, Software Craftsmanship | Leave a comment

Building A Pristine Rails Virtual Machine

A (thankfully) long time ago in a galaxy far far away I developed web apps in Flash. And when I had to target different versions I had to go through a whole rigamarole of uninstalling and reinstalling plugins. Fast forward to now and I’m often working on projects in Ruby. I’ve found RVM and gemsets […]

Also posted in Agile Software Development, Engineering, Rails, Software Craftsmanship | Leave a comment

Using Puppet and Vagrant to make a one-click development environment

Rees's Polygraph

Keeping a development environment clean and tidy can be a bitch. When you are working on multiple projects across different platforms it can get messy really fast. And if you’re managing a team of people and need them all to run your app locally things can get tricky too. Recently I’ve setup a process so […]

Also posted in Agile Software Development, Engineering, Rails, Software Craftsmanship | Leave a comment