title: FactoryGirl: Change an attribute after FactoryGirl.create is called
body: <p>In my user model, all users are assigned the role of <code>user</code> in a <code>before_create</code> callback. So I'm having a lot of trouble creating an admin user to use in some tests. Here is what I've tried, which is not working:</p>
  
  <pre><code>require 'spec_helper'
  
  describe "Exercises" do
    describe "GET /Exercises" do
      it "gives the expected status code." do
          sign_in_as_valid_user
          @user.role = 'admin'
  
        get exercises_path
        response.status.should be(200)
      end
  </code></pre>
  
  <p>for completeness, here is the method that is called:</p>
  
  <pre><code>module ValidUserRequestHelper
      def sign_in_as_valid_user
          FactoryGirl.create :program
          @user ||= FactoryGirl.create :user
  
          post_via_redirect user_session_path, 'user[email]' =&gt; @user.email, 'user[password]' =&gt; @user.password
      end
  end
  </code></pre>
  
  <p>and the factory:</p>
  
  <pre><code>FactoryGirl.define do
    sequence :email do |n|
      "test#{n}@vitogo.com"
    end
  
    factory :user do
      email           
      password                            '12345678'
      password_confirmation '12345678'
      goal_id                             1
      experience_level_id     1
      gender                              'Female'
    end
  end
  </code></pre>
  
  <p>I'm just trying to change the role in the specific tests where it matters.</p>
  
  <p>Any ideas how to do this? It's been driving me crazy. Thanks in advance!</p>