aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/inflector_test_cases.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-26 17:59:35 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-26 17:59:35 -0800
commit2c43a6429e537bf4d52c4592fb0c8542029f8e78 (patch)
tree855480492e0ebd2c4006922f7722a564d322e392 /activesupport/test/inflector_test_cases.rb
parent51e15a60b012562a46c692070f15ac9dcd4902b6 (diff)
downloadrails-2c43a6429e537bf4d52c4592fb0c8542029f8e78.tar.gz
rails-2c43a6429e537bf4d52c4592fb0c8542029f8e78.tar.bz2
rails-2c43a6429e537bf4d52c4592fb0c8542029f8e78.zip
Ruby 1.9 compat: no Unicode normalization support yet
Diffstat (limited to 'activesupport/test/inflector_test_cases.rb')
-rw-r--r--activesupport/test/inflector_test_cases.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb
index 3aa18ca781..481c3e835c 100644
--- a/activesupport/test/inflector_test_cases.rb
+++ b/activesupport/test/inflector_test_cases.rb
@@ -147,14 +147,25 @@ module InflectorTestCases
StringToParameterized = {
"Donald E. Knuth" => "donald-e-knuth",
"Random text with *(bad)* characters" => "random-text-with-bad-characters",
- "Malmö" => "malmo",
- "Garçons" => "garcons",
"Allow_Under_Scores" => "allow_under_scores",
"Trailing bad characters!@#" => "trailing-bad-characters",
"!@#Leading bad characters" => "leading-bad-characters",
"Squeeze separators" => "squeeze-separators"
}
+ # Ruby 1.9 doesn't do Unicode normalization yet.
+ if RUBY_VERSION >= '1.9'
+ StringToParameterizedAndNormalized = {
+ "Malmö" => "malm",
+ "Garçons" => "gar-ons"
+ }
+ else
+ StringToParameterizedAndNormalized = {
+ "Malmö" => "malmo",
+ "Garçons" => "garcons"
+ }
+ end
+
UnderscoreToHuman = {
"employee_salary" => "Employee salary",
"employee_id" => "Employee",