BDD Training

Update: This training is now available as a public course, starting October 8th in London. Would you like to learn how Behaviour-Driven Development can help your company get better at software development? I’ve helped several teams learn BDD, and I’ve started to formalise the training I’ve been doing into a set of course modules. The […]

Fixing my testing workflow

Okay I’m bored of this. I need to talk about it. I love to use Ruby, RSpec, Cucumber and Rails to do test-driven development, but my tools for running tests are just infuriatingly dumb. Here’s what I want: When a test fails, it should be kept on a list until it has been seen to […]

Cucumber: Why Bother?

It’s perfectly possible to write automated acceptance tests without using Cucumber. You can just write them in pure Ruby. Take this test for withdrawing cash from an ATM: Scenario: Attempt withdrawal using stolen card Given I have $100 in my account But my card is invalid When I request $50 Then my card should not […]

Using Capybara with RSpec Outside Cucumber

If you want to try using Capybara for browser automation on it’s own, here’s a simple script to get you started: require ‘rubygems’ require ‘capybara’ require ‘capybara/dsl’ Capybara.default_driver = :selenium Capybara.app_host = “” require “rspec/expectations” class Google include Capybara include RSpec::Matchers def search_for(text) visit “/” fill_in “q”, :with => text click_button “Search” end def ensure_results_contain(expected_text) […]

Features != User Stories

User Stories are a great way to plan your work. You can take a big hairy requirement and break it down into chunks that are small enough to work on without anyone freaking out. When you’ve crumbled up your big hairy requirement into little user story chunks, you can pick and choose which chunk to […]

Outside-In vs Inside Out – Comparing TDD Approaches

At last month’s ScotRUG Brian Swan and I attempted to solve the TDD Avatars problem as a live recital in our chosen style. We each had 35 minutes. The videos are here: Brian’s Inside-Out TDD approach Matt’s Outside-In approach When Brian had walked us through his approach and solution at the last month’s meeting, he’d […]

Fix RubyMine 2.02 Cucumber Integration

If you’re using the latest version of RubyMine (2.0.2) with the latest version of Cucumber (actually anything above 0.7), you’ll probably see this ugly warning when you try to run your cukes from within the IDE: The bug has been logged, and there’s a published workaround, but I wanted something a bit easier to use. […]