diff options
Diffstat (limited to 'actionpack/lib/action_controller/new_base/testing.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/testing.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/new_base/testing.rb b/actionpack/lib/action_controller/new_base/testing.rb index d8c3421587..a4a1116d9e 100644 --- a/actionpack/lib/action_controller/new_base/testing.rb +++ b/actionpack/lib/action_controller/new_base/testing.rb @@ -1,5 +1,8 @@ module ActionController module Testing + extend ActiveSupport::Concern + + include RackConvenience # OMG MEGA HAX def process_with_new_base_test(request, response) @@ -12,7 +15,7 @@ module ActionController set_test_assigns ret end - + def set_test_assigns @assigns = {} (instance_variable_names - self.class.protected_instance_variables).each do |var| @@ -26,5 +29,11 @@ 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 |