From a01d2a25867dbe5235c29557673f3a5692b82aec Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 22 May 2009 16:25:49 -0700 Subject: Remove gratuitous filter_chain internal testing. Not part of the API and other tests are sufficient to catch regressions. --- actionpack/test/controller/filters_test.rb | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'actionpack') diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index afefc6a77e..490061ed9b 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -1,6 +1,5 @@ require 'abstract_unit' -# FIXME: crashes Ruby 1.9 class FilterTest < Test::Unit::TestCase include ActionController::TestProcess @@ -141,14 +140,6 @@ class FilterTest < Test::Unit::TestCase before_filter :clean_up_tmp, :if => Proc.new { |c| false } end - class EmptyFilterChainController < TestController - self.filter_chain.clear - def show - @action_executed = true - render :text => "yawp!" - end - end - class PrependingController < TestController prepend_before_filter :wonderful_life # skip_before_filter :fire_flash @@ -455,12 +446,6 @@ class FilterTest < Test::Unit::TestCase assert_equal ["filter_one", "zomg it didn't yield"], controller.assigns['filters'] end - def test_empty_filter_chain - assert_equal 0, EmptyFilterChainController.filter_chain.size - test_process(EmptyFilterChainController) - assert @controller.template.assigns['action_executed'] - end - def test_added_filter_to_inheritance_graph assert_equal [ :ensure_login ], TestController.before_filters end @@ -614,7 +599,6 @@ class FilterTest < Test::Unit::TestCase end def test_running_prepended_before_and_after_filter - assert_equal 3, PrependingBeforeAndAfterController.filter_chain.length test_process(PrependingBeforeAndAfterController) assert_equal %w( before_all between_before_all_and_after_all after_all ), @controller.template.assigns["ran_filter"] end @@ -818,15 +802,6 @@ class YieldingAroundFiltersTest < Test::Unit::TestCase include PostsController::AroundExceptions include ActionController::TestProcess - def test_filters_registering - assert_equal 1, ControllerWithFilterMethod.filter_chain.size - assert_equal 1, ControllerWithFilterClass.filter_chain.size - assert_equal 1, ControllerWithFilterInstance.filter_chain.size - assert_equal 3, ControllerWithSymbolAsFilter.filter_chain.size - assert_equal 6, ControllerWithNestedFilters.filter_chain.size - assert_equal 4, ControllerWithAllTypesOfFilters.filter_chain.size - end - def test_base controller = PostsController assert_nothing_raised { test_process(controller,'no_raise') } -- cgit v1.2.3