From 10085114ce7ec6bc967fa701c49ef218f666efb5 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Mon, 25 May 2009 18:05:58 +0200 Subject: Make Filter#filter work with around filters --- actionpack/lib/action_controller/new_base/testing.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/lib/action_controller/new_base/testing.rb') diff --git a/actionpack/lib/action_controller/new_base/testing.rb b/actionpack/lib/action_controller/new_base/testing.rb index d8c3421587..78051a6252 100644 --- a/actionpack/lib/action_controller/new_base/testing.rb +++ b/actionpack/lib/action_controller/new_base/testing.rb @@ -1,5 +1,6 @@ module ActionController module Testing + extend ActiveSupport::DependencyModule # OMG MEGA HAX def process_with_new_base_test(request, response) @@ -26,5 +27,12 @@ module ActionController @_response ||= ActionDispatch::Response.new @_response.headers.replace(new_headers) end + + module ClassMethods + def before_filters + _process_action_callbacks.find_all{|x| x.kind == :before}.map{|x| x.name} + end + end + end end -- cgit v1.2.3