From 026efe5d15d582072189fc5ef28b7f7877652e70 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 13 Apr 2019 09:50:49 +1200 Subject: [PATCH] Rubocop lint --- spec/controllers/crops_controller_spec.rb | 4 ++-- spec/models/photo_spec.rb | 12 ++++++------ spec/support/feature_helpers.rb | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spec/controllers/crops_controller_spec.rb b/spec/controllers/crops_controller_spec.rb index e484e8a1a..d4271ed5b 100644 --- a/spec/controllers/crops_controller_spec.rb +++ b/spec/controllers/crops_controller_spec.rb @@ -52,8 +52,8 @@ describe CropsController do describe 'perform a search' do before { get :search, params: { term: 'tom' } } - it { expect(assigns(:term)).to eq 'tom'} - it { expect(assigns(:crops).map(&:name)).to eq ['tomato']} + it { expect(assigns(:term)).to eq 'tom' } + it { expect(assigns(:crops).map(&:name)).to eq ['tomato'] } end end end diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index b78718f5c..d71a6cd1c 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -146,12 +146,12 @@ describe Photo do seed.photos << seed_photo end - it { expect(Photo.by_model(Harvest)).to eq([ harvest_photo ]) } - it { expect(Photo.by_model(Planting)).to eq([ planting_photo ]) } - it { expect(Photo.by_model(Seed)).to eq([ seed_photo ]) } + it { expect(Photo.by_model(Harvest)).to eq([harvest_photo]) } + it { expect(Photo.by_model(Planting)).to eq([planting_photo]) } + it { expect(Photo.by_model(Seed)).to eq([seed_photo]) } - it { expect(Photo.by_crop(harvest_crop)).to eq([ harvest_photo ]) } - it { expect(Photo.by_crop(planting_crop)).to eq([ planting_photo ]) } - it { expect(Photo.by_crop(seed_crop)).to eq([ seed_photo ]) } + it { expect(Photo.by_crop(harvest_crop)).to eq([harvest_photo]) } + it { expect(Photo.by_crop(planting_crop)).to eq([planting_photo]) } + it { expect(Photo.by_crop(seed_crop)).to eq([seed_photo]) } end end diff --git a/spec/support/feature_helpers.rb b/spec/support/feature_helpers.rb index c6b37007c..836ff35eb 100644 --- a/spec/support/feature_helpers.rb +++ b/spec/support/feature_helpers.rb @@ -1,7 +1,7 @@ module FeatureHelpers def fill_autocomplete(field, options = {}) Crop.reindex if ENV["GROWSTUFF_ELASTICSEARCH"] == "true" - + fill_in field, with: options[:with] page.execute_script " $('##{field}').trigger('focus'); "