title: Factory already registered: user (FactoryGirl::DuplicateDefinitionError)
body: <p><strong>Description of problem:</strong>
  - I've setup factory_girl_rails however whenever I try and load a factory it's trying to load it multiple times.</p>
  
  <pre><code>Environment:
  - rails (3.2.1)
  - factory_girl (2.5.2)
  - factory_girl_rails (1.6.0)
  - ruby-1.9.3-p0 [ x86_64 ]
  
  &gt; rake spec --trace
  ** Execute environment
  -- Creating User Factory
  -- Creating User Factory
  rake aborted!
  Factory already registered: user
  </code></pre>
  
  <p>The only other thing I've changed is:
  /config/initializers/generator.rb</p>
  
  <pre><code>Rails.application.config.generators do |g|
    g.test_framework = :rspec
    g.fixture_replacement :factory_girl
  end
  </code></pre>
  
  <p><strong>GEMFILE</strong></p>
  
  <pre><code>gem 'rails', '3.2.1'
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.3'
    gem 'coffee-rails', '~&gt; 3.2.1'
  
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  gem 'devise'
  gem 'haml-rails'
  
  group :development do
    gem 'hpricot'
    gem 'ruby_parser'
    gem "rspec-rails"
  end
  
  group :test do
    gem "rspec"
    gem 'factory_girl_rails'
  end
  
  gem 'refinerycms-core',       :git =&gt; 'git://github.com/resolve/refinerycms.git'
  gem 'refinerycms-dashboard',  :git =&gt; 'git://github.com/resolve/refinerycms.git'
  gem 'refinerycms-images',     :git =&gt; 'git://github.com/resolve/refinerycms.git'
  gem 'refinerycms-pages',      :git =&gt; 'git://github.com/resolve/refinerycms.git'
  gem 'refinerycms-resources',  :git =&gt; 'git://github.com/resolve/refinerycms.git'
  gem 'refinerycms-settings',   :git =&gt; 'git://github.com/resolve/refinerycms.git'
  
  group :development, :test do
    gem 'refinerycms-testing',  :git =&gt; 'git://github.com/resolve/refinerycms.git'
  end
  
  gem 'refinerycms-inventories', :path =&gt; 'vendor/engines'
  
  FactoryGirl.define do
    factory :role do
      title "MyString"
    end
  end
  </code></pre>
  
  <p>This seems to be a compatibility/environment issue that I can't seem to figure out.  Any suggestions?</p>
  
  <p><strong>EDIT</strong>: here's my spec/spec_helper.rb:</p>
  
  <pre><code>ENV["RAILS_ENV"] ||= 'test'
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'
  #require 'factory_girl_rails'
  
  # Requires supporting ruby files with custom matchers and macros, etc,
  # in spec/support/ and its subdirectories.
  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
  
  RSpec.configure do |config|
  ### Mock Framework
    #
    # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
    #
    # config.mock_with :mocha
    # config.mock_with :flexmock
    # config.mock_with :rr
  
    # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
    #config.fixture_path = "#{::Rails.root}/spec/fixtures"
  
    # If you're not using ActiveRecord, or you'd prefer not to run each of your
    # examples within a transaction, remove the following line or assign false
    # instead of true.
    config.use_transactional_fixtures = true
  
    # If true, the base class of anonymous controllers will be inferred
    # automatically. This will be the default behavior in future versions of
    # rspec-rails.
    config.infer_base_class_for_anonymous_controllers = false
  end
  </code></pre>