FactoryBot.define do factory :equipment_item, class: 'Mks::Edm::EquipmentItem' do code { FFaker::Name.name } name { FFaker::Name.name } description { FFaker::Name.name } serial_number { FFaker::Name.name } brand { FFaker::Name.name } item_model { FFaker::Name.name } purchase_price { 1.5 } purchase_date { Date.new } association :equipment association :current_location, factory: :equipment_location end end