diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-05-10 04:08:05 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-09 23:56:14 -0300 |
commit | d7be30e8babf5e37a891522869e7b0191b79b757 (patch) | |
tree | 0887d73a46f09d59a970bf3b0fa5e5f5618054ea /actionpack/test/controller | |
parent | 02989ee38f8cc5e82e7106ff8689d4635b016f40 (diff) | |
download | rails-d7be30e8babf5e37a891522869e7b0191b79b757.tar.gz rails-d7be30e8babf5e37a891522869e7b0191b79b757.tar.bz2 rails-d7be30e8babf5e37a891522869e7b0191b79b757.zip |
Remove deprecated methods related to controller filters
`skip_action_callback`, `skip_filter`, `before_filter`,
`prepend_before_filter`, `skip_before_filter`,
`append_before_filter`, `around_filter`
`prepend_around_filter`, `skip_around_filter`,
`append_around_filter`, `after_filter`,
`prepend_after_filter`, `skip_after_filter` and
`append_after_filter`.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index e0987070a3..a34878cee8 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -2,7 +2,7 @@ require "abstract_unit" class ActionController::Base class << self - %w(append_around_action prepend_after_action prepend_around_action prepend_before_action skip_after_action skip_before_action skip_action_callback).each do |pending| + %w(append_around_action prepend_after_action prepend_around_action prepend_before_action skip_after_action skip_before_action).each do |pending| define_method(pending) do |*args| $stderr.puts "#{pending} unimplemented: #{args.inspect}" end unless method_defined?(pending) @@ -956,13 +956,6 @@ class ControllerWithTwoLessFilters < ControllerWithAllTypesOfFilters skip_after_action :after end -class SkipFilterUsingSkipActionCallback < ControllerWithAllTypesOfFilters - ActiveSupport::Deprecation.silence do - skip_action_callback :around_again - skip_action_callback :after - end -end - class YieldingAroundFiltersTest < ActionController::TestCase include PostsController::AroundExceptions @@ -1047,27 +1040,6 @@ class YieldingAroundFiltersTest < ActionController::TestCase assert_equal 3, controller.instance_variable_get(:@try) end - def test_skipping_with_skip_action_callback - test_process(SkipFilterUsingSkipActionCallback,"no_raise") - assert_equal "before around (before yield) around (after yield)", @controller.instance_variable_get(:@ran_filter).join(" ") - end - - def test_deprecated_skip_action_callback - assert_deprecated do - Class.new(PostsController) do - skip_action_callback :clean_up - end - end - end - - def test_deprecated_skip_filter - assert_deprecated do - Class.new(PostsController) do - skip_filter :clean_up - end - end - end - protected def test_process(controller, action = "show") @controller = controller.is_a?(Class) ? controller.new : controller |