diff --git a/app/helpers/plantings_helper.rb b/app/helpers/plantings_helper.rb index fecbd8b59..ffa271f43 100644 --- a/app/helpers/plantings_helper.rb +++ b/app/helpers/plantings_helper.rb @@ -51,7 +51,6 @@ module PlantingsHelper (planting.last_harvest_predicted_at - Time.zone.today).to_i end - def planting_classes(planting) classes = [] classes << 'planting-growing' if planting.growing? diff --git a/app/helpers/seeds_helper.rb b/app/helpers/seeds_helper.rb index d52913869..5ae960b87 100644 --- a/app/helpers/seeds_helper.rb +++ b/app/helpers/seeds_helper.rb @@ -6,6 +6,7 @@ module SeedsHelper pluralize(seed.quantity, 'seed') end end + def display_seed_description(seed) if seed.description.present? truncate(seed.description, length: 130, separator: ' ', omission: '... ') { link_to "Read more", seed_path(seed) } diff --git a/spec/features/shared_examples/append_date.rb b/spec/features/shared_examples/append_date.rb index e97260758..a35506157 100644 --- a/spec/features/shared_examples/append_date.rb +++ b/spec/features/shared_examples/append_date.rb @@ -6,7 +6,7 @@ shared_examples "append date" do describe "Selecting a date with datepicker" do before do - click_link link_text + click_link link_text within "div.datepicker" do expect(page).to have_content this_month.to_s find(".datepicker-days td.day", text: "21").click diff --git a/spec/views/plantings/show.html.haml_spec.rb b/spec/views/plantings/show.html.haml_spec.rb index b15df6b63..52b49bbe4 100644 --- a/spec/views/plantings/show.html.haml_spec.rb +++ b/spec/views/plantings/show.html.haml_spec.rb @@ -37,7 +37,7 @@ describe "plantings/show" do describe "shows planted_from if blank" do before do - planting.update(planted_from: '') + planting.update(planted_from: '') render end it { expect(rendered).not_to have_content 'Planted from' }