FactoryBot.define do factory :lookup, class: "Comee::Core::Lookup" do code { Faker::Alphanumeric.alpha(number: 8) } name { Faker::Lorem.word } lookup_type { Faker::Alphanumeric.alpha(number: 8) } end factory :country, parent: :lookup do lookup_type { :country } end end