title: Why is ID blank when using create method in spec file?
body: <p>I have the following code in a micropost_spec.rb:</p>
  
  <pre><code>  before(:each) do
      @user = Factory :user
      @attr = { :paragraphs =&gt; 4, :characters =&gt; 1000, :summary =&gt; "Recap of Event" }
    end
  
    it "should create a new instance given valid attributes" do
      @user.microposts.create!(@attr)
    end
  </code></pre>
  
  <p>And when I run my tests, I get the following error:</p>
  
  <pre><code>  Failure/Error: @user.microposts.create!(@attr)
    ActiveRecord::RecordInvalid:
       Validation failed: Id can't be blank
  </code></pre>
  
  <p>Is it possible to see if the id is set inside the rails console?</p>