RailsCasts Pro episodes are now free!

Learn more or hide this

Factories not Fixtures

#158 Factories not Fixtures

Apr 20, 2009 | 12 minutes | Testing, Tools
Fixtures are external dependencies which can make tests brittle and difficult to read. In this episode I show a better alternative using factories to generate the needed records.
  • Download:
  • source codeProject Files in Zip (118 KB)
  • mp4Full Size H.264 Video (20 MB)
  • m4vSmaller H.264 Video (13.2 MB)
  • webmFull Size VP8 Video (36.5 MB)
  • ogvFull Size Theora Video (27.1 MB)