From c2b4c67077ea7f2005d9df590f6827170e35efb5 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 28 Dec 2019 09:34:04 +1300 Subject: [PATCH] crop compantion tests --- spec/models/crop_companion_spec.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/models/crop_companion_spec.rb b/spec/models/crop_companion_spec.rb index e1cedbfd0..52be791e2 100644 --- a/spec/models/crop_companion_spec.rb +++ b/spec/models/crop_companion_spec.rb @@ -3,5 +3,12 @@ require 'rails_helper' RSpec.describe CropCompanion, type: :model do - pending "add some examples to (or delete) #{__FILE__}" + it 'has a crop' do + cc = CropCompanion.new + cc.crop_a = FactoryBot.create :tomato + cc.crop_b = FactoryBot.create :maize + cc.save! + + expect(cc.crop_a.name).to eq 'tomato' + end end