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 end