Permalink
Browse files

Remove gratuitous filter_chain internal testing. Not part of the API …

…and other tests are sufficient to catch regressions.
  • Loading branch information...
1 parent 444480c commit a01d2a25867dbe5235c29557673f3a5692b82aec @jeremy jeremy committed May 22, 2009
Showing with 0 additions and 25 deletions.
  1. +0 −25 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 ConditionalOptionsFilter < ConditionalFilterController
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 @@ def test_after_filters_are_not_run_if_around_filter_does_not_yield
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 @@ def test_dynamic_dispatch
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') }

0 comments on commit a01d2a2

Please sign in to comment.