title: Factory_girl and RSpec: undefined method `new' for Test:Module
body: <p>I generated the following scaffold (using Ruby 2.2.0, rails 4.1.8, postgres):</p>
  
  <pre><code> rails g scaffold Test user:references text:references data:hstore
  </code></pre>
  
  <p>In my test_spec.rb:</p>
  
  <pre><code>require 'rails_helper'
  
  RSpec.describe Test, :type =&gt; :model do
    describe 'User generates a test' do
      before do
        @text = create(:text, content: "Cats eat mice")
        @user = create(:user)
        @test = create(:test)
      end
  ...
  </code></pre>
  
  <p>When I run rspec the test fails with the following message:</p>
  
  <pre><code>Failure/Error: @test = create(:test)
   NoMethodError:
     undefined method `new' for Test:Module
   # ./spec/models/test_spec.rb:8:in `block (3 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>When I test other models (user, text) everything works well, only the Test model fails. Calling Test.create(...) in rspec file also fails. Creating new test in rails console works. Any ideas how to fix this?</p>