asciinema.org/spec/factories/users.rb

21 lines
455 B
Ruby
Raw Normal View History

2012-03-10 13:57:53 +00:00
# Read about factories at http://github.com/thoughtbot/factory_girl
FactoryGirl.define do
sequence(:uid) { |n| n }
2014-02-12 19:51:01 +00:00
sequence(:username) { |n| "user#{n}" }
2012-03-10 13:57:53 +00:00
factory :user do
provider "twitter"
uid
2014-02-12 19:51:01 +00:00
sequence(:username) { generate(:username) }
sequence(:email) { |n| "foo#{n}@bar.com" }
2012-03-10 13:57:53 +00:00
name nil
avatar_url nil
end
factory :dummy_user, class: User do
dummy true
2014-02-12 19:51:01 +00:00
sequence(:username) { generate(:username) }
end
2012-03-10 13:57:53 +00:00
end