Skip to content

Instantly share code, notes, and snippets.

@heavysixer
Created September 11, 2009 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heavysixer/185540 to your computer and use it in GitHub Desktop.
Save heavysixer/185540 to your computer and use it in GitHub Desktop.
Factory.sequence :login do |n|
"user#{n}"
end
Factory.sequence :email do |n|
"user#{n}@example.com"
end
Factory.define :account, :class => 'account' do |u|
u.login { Factory.next(:login) }
u.email { Factory.next(:email) }
u.paypal { Factory.next(:email) }
u.password '1qaz2wsx'
u.password_confirmation {|u| u.password }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment