diff options
author | Akira Matsuda <ronnie@dio.jp> | 2013-01-23 13:23:22 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2013-01-23 13:29:40 +0900 |
commit | 389ae055aede8bce1721c0e7ab60c9aaec2109ee (patch) | |
tree | 6dbdb867df602fda2330fb91d6ca47394d46769e /activesupport/test/core_ext | |
parent | 740d363890522ab219c9da6da3f23f21ea779bee (diff) | |
download | rails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.tar.gz rails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.tar.bz2 rails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.zip |
Test String#dasherize
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index db1cf14abf..4ee78ad0d4 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -87,6 +87,12 @@ class StringInflectionsTest < ActiveSupport::TestCase assert_equal('capital', 'Capital'.camelize(:lower)) end + def test_dasherize + UnderscoresToDashes.each do |underscored, dasherized| + assert_equal(dasherized, underscored.dasherize) + end + end + def test_underscore CamelToUnderscore.each do |camel, underscore| assert_equal(underscore, camel.underscore) |