title: Setup Factory Girl with Test::Unit and Shoulda
body: <p>I'm trying to set up Factory Girl with Test::Unit and Shoulda in Ruby on Rails. I have installed the gem, created my factory file under the test/factories directory, and created my spec file under the test/models directory. The current error I'm getting is 'ArgumentError: No such factory: test', which leads me to believe that the test_factory.rb file is not being loaded? Any idea as to what I should change?</p>
  
  <p>Here are my files.</p>
  
  <pre><code>#test/factories/test_factory.rb
  Factory.define :test do |t|  
    t.name 'test_spotlight'  
    t.label 'test spotlight label'  
  end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>#test/modes/test_spec.rb
  require 'test_helper'
  require 'factory_girl'
  class TestTest &lt; Test::Unit::TestCase
    def setup
      @test = Factory.build(:test)
    end
  
    context "A test" do
      should "save with the minimum requirements" do
        assert @test.save
      end
    end 
  end 
  </code></pre>