diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-22 12:13:26 -0500 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-04-22 12:13:26 -0500 |
commit | 148d909380cf9b85a51875a6790a6d69a2d0d693 (patch) | |
tree | 94164a2ff06c3e45fae16e91765de612a8f97e88 /activesupport/test | |
parent | 85c2141fe3d7edb636a0b5e1d203f05c70db39dc (diff) | |
parent | 459f7bf38aa196cf4d2d970173b02d88e4a4e75c (diff) | |
download | rails-148d909380cf9b85a51875a6790a6d69a2d0d693.tar.gz rails-148d909380cf9b85a51875a6790a6d69a2d0d693.tar.bz2 rails-148d909380cf9b85a51875a6790a6d69a2d0d693.zip |
Merge pull request #14801 from kuldeepaggarwal/fix-string-inflection
Fix inconsistent behavior from String#pluralize
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index f8d4d0f0dc..95df173880 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -58,6 +58,11 @@ class StringInflectionsTest < ActiveSupport::TestCase assert_equal("blargles", "blargle".pluralize(2)) end + test 'pluralize with count = 1 still returns new string' do + name = "Kuldeep" + assert_not_same name.pluralize(1), name + end + def test_singularize SingularToPlural.each do |singular, plural| assert_equal(singular, plural.singularize) |