diff --git a/spec/models/crop_spec.rb b/spec/models/crop_spec.rb index 39c6e197b..831b786e5 100644 --- a/spec/models/crop_spec.rb +++ b/spec/models/crop_spec.rb @@ -1,6 +1,9 @@ require 'rails_helper' describe Crop do + let(:pp2) { FactoryBot.create(:plant_part) } + let(:pp1) { FactoryBot.create(:plant_part) } + let(:maize) { FactoryBot.create(:maize) } context 'all fields present' do let(:crop) { FactoryBot.create(:tomato) } @@ -342,9 +345,6 @@ describe Crop do end end - let(:maize) { FactoryBot.create(:maize) } - let(:pp1) { FactoryBot.create(:plant_part) } - let(:pp2) { FactoryBot.create(:plant_part) } context "harvests" do let(:h1) { FactoryBot.create(:harvest, crop: maize, plant_part: pp1) }