mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 09:43:24 -04:00
Merge pull request #624 from pozorvlak/inflections
Add inflections for irregular plural crop names
This commit is contained in:
@@ -16,4 +16,11 @@
|
||||
|
||||
ActiveSupport::Inflector.inflections do |inflect|
|
||||
inflect.plural 'square foot', 'square feet'
|
||||
inflect.plural 'broccoli', 'broccoli'
|
||||
inflect.plural 'kale', 'kale'
|
||||
inflect.plural 'squash', 'squash'
|
||||
inflect.plural 'bok choy', 'bok choy'
|
||||
inflect.plural 'achiote', 'achiote'
|
||||
inflect.plural 'alfalfa', 'alfalfa'
|
||||
inflect.plural 'allspice', 'allspice'
|
||||
end
|
||||
|
||||
13
spec/features/crops/inflections_spec.rb
Normal file
13
spec/features/crops/inflections_spec.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
require 'spec_helper'
|
||||
|
||||
feature "irregular crop inflections" do
|
||||
|
||||
# We're just testing a couple of representative crops to
|
||||
# check that inflection works: you don't need to add
|
||||
# every crop here.
|
||||
scenario "crops which are mass nouns" do
|
||||
expect("kale".pluralize).to eq "kale"
|
||||
expect("broccoli".pluralize).to eq "broccoli"
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user