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/abstract | |
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/abstract')
-rw-r--r-- | actionpack/test/abstract/callbacks_test.rb | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/actionpack/test/abstract/callbacks_test.rb b/actionpack/test/abstract/callbacks_test.rb index a0f2efa330..9c2261bf76 100644 --- a/actionpack/test/abstract/callbacks_test.rb +++ b/actionpack/test/abstract/callbacks_test.rb @@ -264,53 +264,5 @@ module AbstractController assert_equal "Hello world Howdy!", controller.response_body end end - - class AliasedCallbacks < ControllerWithCallbacks - ActiveSupport::Deprecation.silence do - before_filter :first - after_filter :second - around_filter :aroundz - end - - def first - @text = "Hello world" - end - - def second - @second = "Goodbye" - end - - def aroundz - @aroundz = "FIRST" - yield - @aroundz << "SECOND" - end - - def index - @text ||= nil - self.response_body = @text.to_s - end - end - - class TestAliasedCallbacks < ActiveSupport::TestCase - def setup - @controller = AliasedCallbacks.new - end - - test "before_filter works" do - @controller.process(:index) - assert_equal "Hello world", @controller.response_body - end - - test "after_filter works" do - @controller.process(:index) - assert_equal "Goodbye", @controller.instance_variable_get("@second") - end - - test "around_filter works" do - @controller.process(:index) - assert_equal "FIRSTSECOND", @controller.instance_variable_get("@aroundz") - end - end end end |