Fast, Sexy, and Svelte: Our Kind of Rails Testing

Location: Portland Ballroom 252 Level: Intermediate
Average rating: ****.
(4.43, 21 ratings)

Testing is an essential practice to delivering working software. We distinguish tests as unit, functional, or acceptance.

Unit tests are fine-grained, focused, and provide fast feedback. UnitRecord seamlessly disconnects ActiveRecord from the database to achieve this precision for models. Similarly, UnitController isolates Rails controllers from view rendering.

Functional tests are more collaborate and course-grained. They need data, and the Model Factory pattern removes any brittle dependency on fixtures. As test suites grow, we need to ensure they do not become slow and cumbersome to run. DeepTest provides modest parallelization so we can run our functional tests as often as our unit tests.

Testing through a browser is our only guarantee to ensure that our application actually meets acceptance criteria. Automating this process typically results in a fragile test suite that is slow, depends on a lot of data setup, and is hard to maintain. Selenium Grid, in conjunction with Model Factory and HPricot, significantly improves the design and maintainability of acceptance tests.

From unit to acceptance, this session covers the spectrum to teach effective testing of Rails applications.

Photo of Dan Manges

Dan Manges

Braintree Payment Solutions

Dan Manges is a passionate programmer who currently focuses on Ruby and Rails development. He enjoys giving back to the community by working on open source projects. After successfully bringing Rails into the enterprise at JPMorgan Chase, he is now a developer with ThoughtWorks.

Zak Tamsen


Zak Tamsen is a senior software developer for ThoughtWorks Inc. He has over a decade of professional experience as a computer scientist. He has been building large enterprise Rails applications for the last two years. Zak enjoys having confidence in his work and has successfully convinced others to implement his ideas for testing applications more effectively, including DeepTest and Selenium Grid.

News and Coverage
co-presented by Ruby Central, Inc. O'Reilly
  • Engine Yard
  • Sun Microsystems
  • FiveRuns
  • GotThingsDone
  • Heroku
  • ThoughtWorks
  • Atlantic Dominion Solutions
  • Blue Box Group
  • CodeGear
  • E-xact
  • ELC Technologies
  • EnterpriseDB
  • GemStone Systems
  • Intridea
  • Morph Labs
  • RightScale
  • TechRepublic

Sponsorship Opportunities

For information on exhibition and sponsorship opportunities at RailsConf, contact Yvonne Romaine.

Download the RailsConf Sponsor/Exhibitor Prospectus

Media and Promotional Opportunities

Download the Media & Promotional Partner Brochure (PDF) for more information on trade opportunities with O'Reilly conferences, or contact mediapartners@

Program Ideas

Post your suggestions for speakers, topics, and activities on the RailsConf wiki or send an email to

Press and Media

For media-related inquiries, contact

Contact Us

View a complete list of RailsConf 2008 contacts.