Sha256: aec64e923c3113aff2918a73b4c574cd5f3cfac223db8f8b8a8eda586467a804
Contents?: true
Size: 1.02 KB
Versions: 11
Compression:
Stored size: 1.02 KB
Contents
FactoryBot.define do # add_scaffold('post', 'title', 'body:text', 'is_featured:boolean') # add_scaffold('person', 'first_name', 'last_name', 'email', 'password', 'is_featured:boolean', 'address:text') # add_scaffold('project', 'status', 'budget:decimal', 'country', 'progress:integer') factory :person do first_name { Faker::Name.first_name } last_name { Faker::Name.last_name } email { Faker::Internet.email } password { Faker::Internet.password } address { Faker::Address.full_address } end factory :post do title { Faker::Quote.famous_last_words } body { Faker::Lorem.paragraphs(number: rand(4...10)).join("\n") } is_featured { [true, false].sample } end factory :project do name { Faker::App.name } status { [:closed, :rejected, :failed, :loading, :running, :waiting, :done, :finalized, :archived, :finished].sample } budget { Faker::Number.decimal(l_digits: 4) } country { Faker::Address.country_code } progress { Faker::Number.between(from: 0, to: 100) } end end
Version data entries
11 entries across 11 versions & 1 rubygems