aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/inflector_test.rb')
-rw-r--r--activesupport/test/inflector_test.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 12976a6d92..c0a2b76a5a 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -110,7 +110,14 @@ class InflectorTest < Test::Unit::TestCase
"Product" => "product",
"SpecialGuest" => "special_guest",
"ApplicationController" => "application_controller",
- "Area51Controller" => "area51_controller",
+ "Area51Controller" => "area51_controller"
+ }
+
+ UnderscoreToLowerCamel = {
+ "product" => "product",
+ "special_guest" => "specialGuest",
+ "application_controller" => "applicationController",
+ "area51_controller" => "area51Controller"
}
CamelToUnderscoreWithoutReverse = {
@@ -308,4 +315,10 @@ class InflectorTest < Test::Unit::TestCase
assert_equal(underscored, Inflector.underscore(Inflector.dasherize(underscored)))
end
end
+
+ def test_underscore_to_lower_camel
+ UnderscoreToLowerCamel.each do |underscored, lower_camel|
+ assert_equal(lower_camel, Inflector.camelize(underscored, false))
+ end
+ end
end