I have models which are namespaced such as this:
class Vehicle < ActiveRecord::Base; end
class Vehicle::Car < Vehicle; end
class Vehicle::Train < Vehicle; end
class Vehicle::Jet < Vehicle; end
When creating factories for these models, they were set up in the following way:
factory :vehicle_car, class: Vehicle::Car do; end
factory :vehicle_train, class: Vehicle::Train do; end
factory :vehicle_jet, class: Vehicle::Jet do; end
This produces the following deprecation warning:
DEPRECATION WARNING: Looking up factories by class is deprecated and will be removed in 5.0. Use symbols instead and set FactoryBot.allow_class_lookup = false.
Is there a format for writing a symbol to name these factories such that I do not need to use the class name to comply with the deprecation warning?