RailsCasts Pro episodes are now free!

Learn more or hide this

Factories not Fixtures (revised)

#158 Factories not Fixtures (revised)

Oct 27, 2011 | 9 minutes | Testing, Tools
Fixtures are external dependencies which can make tests brittle and difficult to read. In this episode I show how to use Factory Girl to generate the needed records directly in the tests.
  • Download:
  • source codeProject Files in Zip (88.7 KB)
  • mp4Full Size H.264 Video (21.1 MB)
  • m4vSmaller H.264 Video (11 MB)
  • webmFull Size VP8 Video (13.2 MB)
  • ogvFull Size Theora Video (25.2 MB)