Sha256: f26926147f548c3653286d58c28b61b28be6b9f23855acdfd12b5b9bb5842327
Contents?: true
Size: 754 Bytes
Versions: 3
Compression:
Stored size: 754 Bytes
Contents
FactoryGirl.define do factory :address do user street { Faker::Address.street_address } city { Faker::Address.city } country { Faker::Address.country } end end FactoryGirl.define do factory :micropost do content { Faker::Lorem.sentence } likes { rand(1..1000) } reposts { rand(1..1000) } status { [:draft, :published, :archived].sample } created_at { rand(1..1000).days.ago } user end end FactoryGirl.define do factory :relationship do association :follower, factory: :user association :followed, factory: :user end end FactoryGirl.define do factory :user do email { Faker::Internet.email } name { Faker::Name.name } factory :admin do admin { true } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
active_hash_relation-1.4.1 | spec/factories/factories.rb |
active_hash_relation-1.4.0 | spec/factories/factories.rb |
active_hash_relation-1.2.0 | spec/factories/factories.rb |