diff options
Diffstat (limited to 'activesupport/test/inflector_test_cases.rb')
-rw-r--r-- | activesupport/test/inflector_test_cases.rb | 15 |
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", |