Permalink
Browse files

wrap test that changes inflections in with_dup

  • Loading branch information...
lihanli committed Nov 28, 2013
1 parent 75bb2bb commit 534b36093d4a2eee564fe3993b20af9a3397886e
Showing with 6 additions and 4 deletions.
  1. +5 −4 activesupport/test/inflector_test.rb
  2. +1 −0 activesupport/test/inflector_test_cases.rb
@@ -70,10 +70,11 @@ def test_uncountable_word_is_not_greedy
def test_overwrite_previous_inflectors
assert_equal("series", ActiveSupport::Inflector.singularize("series"))
ActiveSupport::Inflector.inflections.singular "series", "serie"
assert_equal("serie", ActiveSupport::Inflector.singularize("series"))
ActiveSupport::Inflector.inflections.uncountable "series" # Return to normal
with_dup do
assert_equal("series", ActiveSupport::Inflector.singularize("series"))
ActiveSupport::Inflector.inflections.singular "series", "serie"
assert_equal("serie", ActiveSupport::Inflector.singularize("series"))
end
end
MixtureToTitleCase.each_with_index do |(before, titleized), index|
@@ -63,6 +63,7 @@ module InflectorTestCases
"news" => "news",
"series" => "series",
"miniseries" => "miniseries",
"species" => "species",
"quiz" => "quizzes",

0 comments on commit 534b360

Please sign in to comment.