From d7e71c8fc37be4893df78ea8b3e1756da7bad116 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Thu, 7 Jun 2018 11:46:29 +1200 Subject: [PATCH] Use factory bot to make a harvest.plant_part --- spec/factories/harvests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories/harvests.rb b/spec/factories/harvests.rb index e12fa973d..7ed88375a 100644 --- a/spec/factories/harvests.rb +++ b/spec/factories/harvests.rb @@ -3,7 +3,7 @@ FactoryBot.define do factory :harvest do crop { planting.present? ? planting.crop : FactoryBot.create(:crop) } - plant_part { create :plant_part, name: Faker::Book.unique.title } + plant_part { FactoryBot.create :plant_part } planting nil owner { planting.present? ? planting.owner : FactoryBot.create(:member) } harvested_at { Time.zone.local(2015, 9, 17) }