Wednesday, July 15, 2026 2:56:19 AM
> exile_container.rb
# frozen_string_literal: true

FactoryBot.define do
  factory :exile_container, class: "ESM::ExileContainer" do
    spawned_at { Faker::Date.backward }
    is_locked { false }
    pin_code { "00000" }
    last_updated_at { Time.current }

    after(:build) do |model|
      # FactoryBot was not detecting this, probably because it's an alias
      model.class_name = ESM::Arma::ClassLookup.where(
        mod: "exile",
        category: "exile_container"
      ).keys.sample
    end
  end
end
All opinions represented herein are my own
- © 2024 - 2026 itsthedevman
- build 43aa0d7