title: Validations Cause Test To Fail
body: <p>I have the following test:</p>
  
  <pre><code>    test "should get create" do
     sign_in(FactoryGirl.create(:user))
      assert_difference('Inquery.count') do
        post :create, FactoryGirl.build(:inquery)
      end
      assert_not_nil assigns(:inquery)
      assert_response :redirect
    end
  </code></pre>
  
  <p>and I keep getting:</p>
  
  <pre><code> 2) Error:
  test_should_get_create(InqueriesControllerTest):
  ActiveRecord::RecordInvalid: Validation failed: Email has already been taken, License number has already been taken
  </code></pre>
  
  <p>What I don't understand is why I get this error in this particular test, when I have a very similar test:</p>
  
  <pre><code> test "should get create" do
      sign_in(FactoryGirl.create(:user, admin: true))
      assert_difference('Event.count') do
        post :create, FactoryGirl.build(:event)
      end
      assert_not_nil assigns(:event)
      assert_response :success
    end
  </code></pre>
  
  <p>and this does just fine. The obvious difference is the admin: true line, but that has no effect as I suspected.</p>
  
  <p>Added:</p>
  
  <p>User_factory.rb</p>
  
  <pre><code> factory :user do
     first_name "John"
     last_name "Doe"
     email "example@example.com"
     password "foobar"
     password_confirmation "foobar"
     license_number '12345'
     state 'AZ'
     specialty 'Neurosurgery'
    end
  </code></pre>