mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Test String#dasherize
This commit is contained in:
parent
740d363890
commit
389ae055ae
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue