Rails unit testing failing due to Devise admin user

ruby-on-rails, ruby-on-rails-3

Solution

Tracked it down to a `fixtures:all` statement in my test_helper.rb, still learning my way in Rails, but thanks to Alfonso for the great suggetions.

Problem

I have a simple unit test: ``` def test_conversation_without_a_name_is_invalid conversation = Conversation.new assert conversation.name.blank? assert !conversation.valid? end ``` that is failing with: 1) Error: test_conversation_without_a_name_is_invalid(ConversationTest): ActiveRecord::RecordNotUnique: PG::Error: ERROR: duplicate key value violates unique constraint "index_admins_on_email" DETAIL: Key (email)=() already exists. It seems that for some reason the test is trying to create a Devise admin user and failing, but I have no idea why it is trying to do this in the first place, or even how to correct it. I ran the same test in the rails console and it worked fine, very confused. Has anyone run into this before or know what is going on? Any help would be appreciated!

Original source