aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-23 13:23:22 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-23 13:29:40 +0900
commit389ae055aede8bce1721c0e7ab60c9aaec2109ee (patch)
tree6dbdb867df602fda2330fb91d6ca47394d46769e /activesupport
parent740d363890522ab219c9da6da3f23f21ea779bee (diff)
downloadrails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.tar.gz
rails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.tar.bz2
rails-389ae055aede8bce1721c0e7ab60c9aaec2109ee.zip
Test String#dasherize
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb6
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)