FactoryBot.define do factory :part_of_speech do sequence(:pos) { |n| "test-#{n.to_s}" } language_id { FactoryBot.create(:language_english).id } definition { "test definition" } end factory :part_of_speech_translation, class: :part_of_speech do sequence(:pos) { |n| "test-#{n.to_s}" } language_id { FactoryBot.create(:language).id } definition { "translated definition" } end end