diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-22 13:01:53 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-08-22 13:01:53 -0700 |
commit | 9dac5547ad65e82a6fbb6a6243ab5c95d9c44db0 (patch) | |
tree | 24dcf69c35ba59e499d4e6e07b4618719599aaf8 /activesupport/test | |
parent | a6e05b18d65d07a157ee09d54167c81f3d1440f8 (diff) | |
parent | c0dd0cee46ac2d0864dc8bbdac1fe526f9cec346 (diff) | |
download | rails-9dac5547ad65e82a6fbb6a6243ab5c95d9c44db0.tar.gz rails-9dac5547ad65e82a6fbb6a6243ab5c95d9c44db0.tar.bz2 rails-9dac5547ad65e82a6fbb6a6243ab5c95d9c44db0.zip |
Merge branch 'master' into i18n
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 4 | ||||
-rw-r--r-- | activesupport/test/inflector_test.rb | 4 |
2 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 19a30f1730..c9f959ef32 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -32,6 +32,10 @@ class StringInflectionsTest < Test::Unit::TestCase end end + def test_camelize_lower + assert_equal('capital', 'Capital'.camelize(:lower)) + end + def test_underscore CamelToUnderscore.each do |camel, underscore| assert_equal(underscore, camel.underscore) diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 6c0c14e866..b2fad4a9bc 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -46,6 +46,10 @@ class InflectorTest < Test::Unit::TestCase end end + def test_camelize_with_lower_downcases_the_first_letter + assert_equal('capital', ActiveSupport::Inflector.camelize('Capital', false)) + end + def test_underscore CamelToUnderscore.each do |camel, underscore| assert_equal(underscore, ActiveSupport::Inflector.underscore(camel)) |