From 3dcae9fefd0af8f7f8e7d3368ec36128880add51 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Sep 2007 18:34:43 +0000 Subject: Fixed that pluralizing an empty string should return the same empty string, not "s" (closes #7720) [josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/inflector_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 684150a925..ebf07e1d0f 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -220,6 +220,10 @@ class InflectorTest < Test::Unit::TestCase assert_equal "Plurals", Inflector.pluralize("Plurals") end + def test_pluralize_empty_string + assert_equal "", Inflector.pluralize("") + end + SingularToPlural.each do |singular, plural| define_method "test_pluralize_#{singular}" do assert_equal(plural, Inflector.pluralize(singular)) -- cgit v1.2.3