title: Using fixtures with factory_girl
body: <p>When building the following factory:</p>
  
  <pre><code>Factory.define :user do |f|
    f.sequence(:name) { |n| "foo#{n}" }
    f.resume_type_id { ResumeType.first.id }
  end
  </code></pre>
  
  <p><code>ResumeType.first</code> returns <strong>nil</strong> and I get an error.</p>
  
  <p><code>ResumeType</code> records are loaded via fixtures. I checked using the console and the entries are there, the table is not empty. </p>
  
  <p>I've found a similar example in the factory_girl mailing list, and it's supposed to work. </p>
  
  <p>What am I missing? Do I have to somehow tell factory_girl to set up the fixtures before running the tests? </p>
  
  <p>This is what my test_helper looks like:</p>
  
  <pre><code>ENV["RAILS_ENV"] = "test"
  require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
  require 'test_help'
  
  class ActiveSupport::TestCase
    self.use_transactional_fixtures = true
    self.use_instantiated_fixtures  = false
    fixtures :all
  end
  </code></pre>