From 2eed9286ce3af77d29bdd20b4c2a5fa93baf03b1 Mon Sep 17 00:00:00 2001 From: Ben Orenstein Date: Tue, 15 Feb 2011 21:32:27 -0500 Subject: Remove unused code. [#6437 state:committed] Signed-off-by: Santiago Pastorino --- activesupport/test/core_ext/module_test.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index 75404ec0e1..9f9840834d 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -26,9 +26,6 @@ module Yz end end -class De -end - Somewhere = Struct.new(:street, :city) Someone = Struct.new(:name, :place) do -- cgit v1.2.3 From 1754bd9b208e8d9207c226d1ffb3cee490856a78 Mon Sep 17 00:00:00 2001 From: Dan Pickett Date: Mon, 7 Feb 2011 21:39:46 -0500 Subject: handle double pluralization for irregular plurals [#6363] Signed-off-by: Santiago Pastorino --- activesupport/test/inflector_test.rb | 7 +++++++ activesupport/test/inflector_test_cases.rb | 1 + 2 files changed, 8 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 60714a152d..f55116dfab 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -63,6 +63,13 @@ class InflectorTest < Test::Unit::TestCase assert_equal(singular.capitalize, ActiveSupport::Inflector.singularize(plural.capitalize)) end end + + SingularToPlural.each do |singular, plural| + define_method "test_pluralize_#{plural}" do + assert_equal(plural, ActiveSupport::Inflector.pluralize(plural)) + assert_equal(plural.capitalize, ActiveSupport::Inflector.pluralize(plural.capitalize)) + end + end def test_overwrite_previous_inflectors assert_equal("series", ActiveSupport::Inflector.singularize("series")) diff --git a/activesupport/test/inflector_test_cases.rb b/activesupport/test/inflector_test_cases.rb index 59515dad32..2b144e5931 100644 --- a/activesupport/test/inflector_test_cases.rb +++ b/activesupport/test/inflector_test_cases.rb @@ -44,6 +44,7 @@ module InflectorTestCases "datum" => "data", "medium" => "media", + "stadium" => "stadia", "analysis" => "analyses", "node_child" => "node_children", -- cgit v1.2.3 From b131cfba055bfbf25f3785c5235c1edbf04ff9f1 Mon Sep 17 00:00:00 2001 From: Ben Orenstein Date: Thu, 17 Feb 2011 00:09:49 -0500 Subject: Remove unused line in test setup. [#6442 state:committed] Signed-off-by: Santiago Pastorino --- activesupport/test/core_ext/module_test.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/module_test.rb b/activesupport/test/core_ext/module_test.rb index 9f9840834d..a95cf1591f 100644 --- a/activesupport/test/core_ext/module_test.rb +++ b/activesupport/test/core_ext/module_test.rb @@ -30,7 +30,6 @@ Somewhere = Struct.new(:street, :city) Someone = Struct.new(:name, :place) do delegate :street, :city, :to_f, :to => :place - delegate :state, :to => :@place delegate :upcase, :to => "place.city" end -- cgit v1.2.3