Browse Source

renamed helper

pull/643/head
JG 3 years ago
parent
commit
f55aee85e7
  1. 2
      app/helpers/title_helper.rb
  2. 2
      spec/helpers/title_helper_spec.rb

2
app/helpers/item_label_helper.rb → app/helpers/title_helper.rb

@ -1,4 +1,4 @@
module ItemLabelHelper
module TitleHelper
def format_label(count, item)
count > 1 ? item.pluralize : item
end

2
spec/helpers/item_label_helper_spec.rb → 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
Loading…
Cancel
Save