aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-04 19:23:07 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-04 19:23:07 +0000
commita693b3becad44f9e1e2fdacab26c1f367ad6ce71 (patch)
treed7b5e5f5ef09c5d7ac042010783b322467896781 /actionpack/test
parentd52cee3e3bb4c45bfd21d3f905e502fa00758def (diff)
downloadrails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.tar.gz
rails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.tar.bz2
rails-a693b3becad44f9e1e2fdacab26c1f367ad6ce71.zip
Fixed TextHelper#pluralize to handle 1 as a string (closes #5905) [rails@bencurtis.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/text_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 6eda59affe..cf945365b4 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -112,6 +112,10 @@ class TextHelperTest < Test::Unit::TestCase
def test_pluralization
assert_equal("1 count", pluralize(1, "count"))
assert_equal("2 counts", pluralize(2, "count"))
+ assert_equal("1 count", pluralize('1', "count"))
+ assert_equal("2 counts", pluralize('2', "count"))
+ assert_equal("1,066 counts", pluralize('1,066', "count"))
+ assert_equal("1.25 counts", pluralize('1.25', "count"))
end
def test_auto_link_parsing