Well, one problem is that in your :brain
factory definition, you're actually calling FactoryGirl.create :user
as part of the definition of the factory when you presumably meant to call it when the factory is invoked (i.e. user {FactoryGirl.create :user}
).
As for why there is already a User
in the database, I can't answer that except to say that sometimes even if you're running with transactions turned on and things go south, records can be left behind.