From f55aee85e7351ff5eedac5439a754bd237a9e5c5 Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 7 Jun 2022 13:35:26 +0100 Subject: [PATCH] renamed helper --- app/helpers/{item_label_helper.rb => title_helper.rb} | 2 +- .../helpers/{item_label_helper_spec.rb => title_helper_spec.rb} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename app/helpers/{item_label_helper.rb => title_helper.rb} (93%) rename spec/helpers/{item_label_helper_spec.rb => title_helper_spec.rb} (98%) diff --git a/app/helpers/item_label_helper.rb b/app/helpers/title_helper.rb similarity index 93% rename from app/helpers/item_label_helper.rb rename to app/helpers/title_helper.rb index 0d0f67cf0..aebb97ebf 100644 --- a/app/helpers/item_label_helper.rb +++ b/app/helpers/title_helper.rb @@ -1,4 +1,4 @@ -module ItemLabelHelper +module TitleHelper def format_label(count, item) count > 1 ? item.pluralize : item end diff --git a/spec/helpers/item_label_helper_spec.rb b/spec/helpers/title_helper_spec.rb similarity index 98% rename from spec/helpers/item_label_helper_spec.rb rename to spec/helpers/title_helper_spec.rb index aad52a549..754e46144 100644 --- a/spec/helpers/item_label_helper_spec.rb +++ b/spec/helpers/title_helper_spec.rb @@ -1,6 +1,6 @@ require "rails_helper" -RSpec.describe ItemLabelHelper do +RSpec.describe TitleHelper do describe "#format_label" do let(:item) { "organisation" } it "returns singular when count is 1" do