FactoryBot.define do factory :crew_time, class: 'Ecom::Core::CrewTime' do date { Date.today } checkin_time { Time.now } checkout_time { Time.now + 2 * 60 * 60 } hours { 2 } converted_hours { 2 } association :crew remark { FFaker::Name.name } overtime { false } overtime_type { nil } end end