Fixtures: Friend or Foe

Tom Preston-Werner

Date: Friday, May 18
Time: 2:50pm - 3:40pm
Location: Oregon Ballroom 203

Rails makes testing your code easy, but as project size increases, the fixtures you've created to hold test data tend to become brittle and interdependent. When your fixtures become a web of complex relationships, seemingly benign changes to one fixture can cause many test cases to fail, creating additional, unnecessary work during development.

This talk will explore the various options for handling complex fixture setups. From fixtureless tests to plugins that add new functionality to Rails, Preston-Werner will cover the benefits and drawbacks of each technique. And there will be a special focus on his solution to the problem: the FixtureScenarios plugin. This plugin allows you to create organized, hierarchical sets of fixtures that represent specific scenarios that you can test against and modify safely.

By the end of the presentation you'll be armed with the knowledge to make your fixtures agile again!

Conference News and Coverage