title: How to use Cucumber and Factory Girl together?
body: <p>I'm trying to configure FactoryGirl to work with my Cucumber tests.
  I added the following lines in env.rb</p>
  
  <pre><code>require 'factory_girl'
  Dir.glob(File.join(File.dirname(__FILE__), '../../spec/factories/*.rb')).each {|f| require f }
  </code></pre>
  
  <p>When I run 'cucumber features', there's no problem.
  I now add a file called <code>teacher.rb</code> to <code>spec/factories</code> and add the following in:</p>
  
  <pre><code>FactoryGirl.define do
    factory :teacher do
      first_name "John"
      last_name "Smith"
    end
  end
  </code></pre>
  
  <p>Now when I run <code>cucumber features</code> I get:
  <code>uninitialized constant FactoryGirl (NameError)</code></p>
  
  <p>I'm obviously missing something, but what is it? How do I get Cucumber to work with Factory Girl?</p>
  
  <p>Thanks!</p>