I foolishly left out my factory girl definitions, which might make
this make sense. In this case, "parent" is a type of User, and many
Users belong to one Account. In the above login step, it creates a
parent (User), and the factory is setup to automatically create an
Account for that user
Factory.define :user do |u|
u.association :account
u.first_name 'John'
u.last_name 'Doe'
u.sequence(:email) { |n| "person#{
n}@example.com" }
u.password 'password'
u.password_confirmation { |u| u.password }
end
Factory.define :parent, :parent => :user do |u|
u.association :account
end
Factory.define :account do |a|
end