aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorLihan Li <frankieteardrop@gmail.com>2013-11-28 12:35:20 -0500
committerLihan Li <frankieteardrop@gmail.com>2013-11-28 12:35:20 -0500
commit534b36093d4a2eee564fe3993b20af9a3397886e (patch)
tree7bfb7132a497ed814ef46449548b7bd833c8f726 /activesupport
parent75bb2bbebb95a05bbe2828dec7b678d31e2ebc80 (diff)
downloadrails-534b36093d4a2eee564fe3993b20af9a3397886e.tar.gz
rails-534b36093d4a2eee564fe3993b20af9a3397886e.tar.bz2
rails-534b36093d4a2eee564fe3993b20af9a3397886e.zip
wrap test that changes inflections in with_dup
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/inflector_test.rb9
-rw-r--r--activesupport/test/inflector_test_cases.rb1
2 files changed, 6 insertions, 4 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 6184df481f..35967ba656 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -70,10 +70,11 @@ class InflectorTest < ActiveSupport::TestCase
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|
diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb
index b34a946baf..4bd1b2e47c 100644
--- a/activesupport/test/inflector_test_cases.rb
+++ b/activesupport/test/inflector_test_cases.rb
@@ -63,6 +63,7 @@ module InflectorTestCases
"news" => "news",
"series" => "series",
+ "miniseries" => "miniseries",
"species" => "species",
"quiz" => "quizzes",