Merge pull request #624 from pozorvlak/inflections

Add inflections for irregular plural crop names
This commit is contained in:
Skud
2015-01-13 10:38:58 +11:00
2 changed files with 20 additions and 0 deletions

View File

@@ -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

View 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