From 88230b7cf77181c2088cce3314493caa9b3ac1fb Mon Sep 17 00:00:00 2001 From: Bogdan Gusiev Date: Sun, 24 Jun 2012 10:30:34 +0300 Subject: AS::Callbacks: deprecate monkey patch code Deprecate usage of filter object with #before and #after methods as around callback --- actionpack/test/controller/filters_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/filters_test.rb b/actionpack/test/controller/filters_test.rb index ef7fbca675..b9cb93f0f4 100644 --- a/actionpack/test/controller/filters_test.rb +++ b/actionpack/test/controller/filters_test.rb @@ -326,6 +326,12 @@ class FilterTest < ActionController::TestCase controller.instance_variable_set(:"@after_ran", true) controller.class.execution_log << " after aroundfilter " if controller.respond_to? :execution_log end + + def around(controller) + before(controller) + yield + after(controller) + end end class AppendedAroundFilter @@ -336,6 +342,12 @@ class FilterTest < ActionController::TestCase def after(controller) controller.class.execution_log << " after appended aroundfilter " end + + def around(controller) + before(controller) + yield + after(controller) + end end class AuditController < ActionController::Base -- cgit v1.2.3