diff options
Diffstat (limited to 'actionpack/test/controller/filters_test.rb')
-rw-r--r-- | actionpack/test/controller/filters_test.rb | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index 1485d740c8..26b94f0db8 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -25,27 +25,26 @@ class ActionController::Base end end -class TestController < ActionController::Base - before_action :ensure_login - after_action :clean_up - - def show - render :inline => "ran action" - end +class FilterTest < ActionController::TestCase + class TestController < ActionController::Base + before_action :ensure_login + after_action :clean_up - private - def ensure_login - @ran_filter ||= [] - @ran_filter << "ensure_login" + def show + render :inline => "ran action" end - def clean_up - @ran_after_action ||= [] - @ran_after_action << "clean_up" - end -end + private + def ensure_login + @ran_filter ||= [] + @ran_filter << "ensure_login" + end -class FilterTest < ActionController::TestCase + def clean_up + @ran_after_action ||= [] + @ran_after_action << "clean_up" + end + end class ChangingTheRequirementsController < TestController before_action :ensure_login, :except => [:go_wild] @@ -1069,7 +1068,7 @@ class YieldingAroundFiltersTest < ActionController::TestCase def test_deprecated_skip_action_callback assert_deprecated do - Class.new(TestController) do + Class.new(PostsController) do skip_action_callback :clean_up end end |