views:

28

answers:

0

Hey, I'm using Rails 3 rc, Factory Girl, and Rspec, and Authlogic. Is there any way or reason why this would happen:

When I create a user like this:

@user = Factory(:user)

I get an issue with password confirmation being "too short".

my factories.rb is

  Factory.define :user do |u| 
      u.username   "Test User"
      u.email      "[email protected]"
      u.password   "aoeuaoeu"
      u.password_confirmation   "aoeuaoeu"
      #u.password_confirmation {|u| u.password}
  end

But when I create one as I pass in :password and :password_confirmation manually, it works just fine. @user = Factory(:user, :password => "aoeuaoeu", :password_confirmation => "aoeuaoeu")

Does anyone have any idea what could be causing this?