From 90366a1521659d07a3b75936b3231adeb376f1a4 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 10 Sep 2008 00:26:50 -0500 Subject: Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby] --- activesupport/test/inflector_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test/inflector_test.rb') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 8eebe1be25..f304844e82 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -98,6 +98,12 @@ class InflectorTest < Test::Unit::TestCase end end + def test_parameterize + StringToParameterized.each do |some_string, parameterized_string| + assert_equal(parameterized_string, ActiveSupport::Inflector.parameterize(some_string)) + end + end + def test_classify ClassNameToTableName.each do |class_name, table_name| assert_equal(class_name, ActiveSupport::Inflector.classify(table_name)) -- cgit v1.2.3