Skip to content

Instantly share code, notes, and snippets.

@danielevans
Last active December 10, 2015 04:48
Show Gist options
  • Save danielevans/4383443 to your computer and use it in GitHub Desktop.
Save danielevans/4383443 to your computer and use it in GitHub Desktop.
#TODO use Faker
FactoryGirl.define do
factory :user do
account
sequence :email do |n|
"user_#{n}@example.com"
end
first_name 'John'
last_name 'Smith'
email { generate(:email, first_name.downcase, last_name.downcase, 'company') }
email_confirmation { email }
password 'password'
password_confirmation { password }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment