Session: Fast Ruby on Rails Tests

Thursday, 13:00 - 13:50
Track: Excellence

Look at your Rails unit test suite. Now look at mine(http://screencast.com/t/O2LhGoVSG). Now look at yours again.Mine are sub-second. Yours aren't.Having a slow unit test suite can hinder an effective test-first ortest-driven approach to development. As you add tests, the suitestarts to slow down to the point where you stop running them aftereach change. Some people even talk about multi-minute unit testssuites! Band-aids like spork are just covering up the problem.Test-driven development is a major player in keeping your designmalleable and accepting of new features, but when you stop payingattention to the messages your tests are sending you, you lose thisbenefit.In this talk, I will go over some techniques for keeping your testsuite lean and fast. Along the way, we'll discuss the designimprovements that come out of these changes.Now, look at my unit test suite again(http://screencast.com/t/O2LhGoVSG). Yours can be like mine.

Prerequisites

Ruby on Rails experience

Expectations

Learn specific practices for speeding up your Ruby on Rails test suite

Corey Haines

After 12 years of coding for money, Corey Haines said enough and went on a year-long, journeyman pair-programming tour. Traveling the world, pair-programming for room and board, he spent his time teaching, learning and just living as a knowledge-cross-pollinating, little, software craftsmanship bee. For the past three years, Corey has focused his attention on helping developers improve their fundamental software design skills through the use of focused-practice events, such as coderetreat. Lately, Corey has been shifting his attention to getting kids excited about programming through building games in Scratch.

Corey Haines