Sha256: 0b4a27d9383cf7aa35a0c40847b4619e34970753b7ffe5ab127a04e755a15816
Contents?: true
Size: 924 Bytes
Versions: 4
Compression:
Stored size: 924 Bytes
Contents
# This will guess the User class FactoryGirl.define do factory :user do sequence(:username, 1) {|n| "#{Faker::Lorem.word}#{n}" } first_name { Faker::Name.first_name } # last_name { Faker::Name.last_name } password "weekend" # password_confirmation "weekend" # sequence(:phone, 1000) {|n| "617470#{n}" } # 6174701000 # email { "#{first_name}.#{last_name}@factoriedusers.com".downcase } # role "user" factory :webmaster do # email { "#{first_name}.#{last_name}@factoriedwebmasters.com".downcase } # role "webmaster" end # factory do :user_with_identities # ignore do # identities_count 1 # if this is greater than one, it could potentially duplicate providers right now # end # after(:create) do |user, evaluator| # FactoryGirl.create_list(:identity, evaluator.identities_count, user: user) # end # end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
valid_route-0.0.4 | test/factories/users.rb |
valid_route-0.0.3 | test/factories/users.rb |
valid_route-0.0.2 | test/factories/users.rb |
valid_route-0.0.1 | test/factories/users.rb |