aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorHenrik N <henrik@nyh.se>2009-03-10 21:36:46 +0000
committerPratik Naik <pratiknaik@gmail.com>2009-03-10 21:36:46 +0000
commitea0e41d8fa5a132a2d2771e9785833b7663203ac (patch)
tree3cde4953b277d9977797ed1d5c21fc7fcacf8153 /activesupport/test
parent4b4e7caffa361a1a3317586d8f498b4ba353adba (diff)
downloadrails-ea0e41d8fa5a132a2d2771e9785833b7663203ac.tar.gz
rails-ea0e41d8fa5a132a2d2771e9785833b7663203ac.tar.bz2
rails-ea0e41d8fa5a132a2d2771e9785833b7663203ac.zip
Make Inflector#parameterize correctly squeeze multi-character separators [#1489 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/inflector_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 948b6d9bb0..6b9fbd3156 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -116,6 +116,12 @@ class InflectorTest < Test::Unit::TestCase
end
end
+ def test_parameterize_with_multi_character_separator
+ StringToParameterized.each do |some_string, parameterized_string|
+ assert_equal(parameterized_string.gsub('-', '__sep__'), ActiveSupport::Inflector.parameterize(some_string, '__sep__'))
+ end
+ end
+
def test_classify
ClassNameToTableName.each do |class_name, table_name|
assert_equal(class_name, ActiveSupport::Inflector.classify(table_name))