FactoryBot.define do factory :crew, class: 'Ecom::Model::Crew' do name { FFaker::Name.name } phone { FFaker::Name.name } email { FFaker::Name.name } qualification { FFaker::Name.name } employment { Ecom::Model::Crew::PERMANENT } wage { FFaker::Random.rand(1000..5000) } association :crew_type end end