FactoryBot.define do factory :definition do pos { "n" } definition { "this is a definition" } word_id { FactoryBot.create(:word).id } end end