title: RSpec failure: could not find table after migration...?
body: <p>I have a naked rails 3 app with one model, generated using <code>rails g model User</code>.</p>
  
  <p>I've added a factory (using <code>factory_girl_rails</code>):</p>
  
  <pre><code>Factory.define :user do |f|
    f.email "test@test.com"
    f.password "blah"
    f.password_confirmation "blah"
    f.display_name "neezer"
  end
  </code></pre>
  
  <p>Then I've added one test:</p>
  
  <pre><code>require 'spec_helper'
  
  describe User do
  
    subject { Factory :user }
  
    it "can be created from a factory" do
      subject.should_not be_nil
      subject.should be_kind_of User
    end
  
  end
  </code></pre>
  
  <p>Then I <em>migrate my database</em> using <code>rake db:migrate</code>.</p>
  
  <p>Then I run the test using <code>rspec spec</code>, and the test fails with the following:</p>
  
  <pre class="lang-none prettyprint-override"><code>Failures:
  
    1) User can be created from a factory
       Failure/Error: subject { Factory :user }
       ActiveRecord::StatementInvalid:
         Could not find table 'users'
       # ./spec/models/user_spec.rb:5:in `block (2 levels) in &lt;top (required)&gt;'
       # ./spec/models/user_spec.rb:8:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>I'm confused, because I did just migrate my database, and my <code>schema.db</code> file reflects that there is a users table present, so what gives?</p>
  
  <p>I know this is a beginner question, but banging my head against a wall isn't working...</p>
  
  <pre class="lang-none prettyprint-override"><code>factory_girl (1.3.3)
  factory_girl_rails (1.0.1)
  rails (3.0.5)
  rspec-rails (2.5.0)
  sqlite3 (1.3.3)
  </code></pre>