aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2016-03-31 02:11:19 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2016-03-31 19:52:10 +0300
commitf2489f493b794ee83a86e746b6240031acb8994e (patch)
tree2cf9a32c4e351373ff68e526ba8c042dbf8e29b4 /activesupport/test
parenta564fecbd0c96815664067b727817045459cae98 (diff)
downloadrails-f2489f493b794ee83a86e746b6240031acb8994e.tar.gz
rails-f2489f493b794ee83a86e746b6240031acb8994e.tar.bz2
rails-f2489f493b794ee83a86e746b6240031acb8994e.zip
Fix method String#upcase_first
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 5c0b60039a..4761ce580c 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -80,6 +80,14 @@ class StringInflectionsTest < ActiveSupport::TestCase
assert_equal "What a Lovely Day", "what a Lovely Day".upcase_first
end
+ def test_upcase_first_with_one_char
+ assert_equal "W", "w".upcase_first
+ end
+
+ def test_upcase_first_with_empty_string
+ assert_equal "", "".upcase_first
+ end
+
def test_camelize
CamelToUnderscore.each do |camel, underscore|
assert_equal(camel, underscore.camelize)