From 67b2841fbeb6db33dd78a95dd61329a8a56fc7c0 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 25 Aug 2015 16:25:52 -0700 Subject: adding a direct dispatch method to controller classes This saves a lambda and request allocation on each request. --- actionpack/test/abstract_unit.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'actionpack/test/abstract_unit.rb') diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 1a61139dfe..39ae8cf899 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -124,16 +124,10 @@ class ActionDispatch::IntegrationTest < ActiveSupport::TestCase class NullController def initialize(controller_name) @controller = controller_name - @action = nil end - def action(action_name) - @action = action_name - self - end - - def call(env) - [200, {'Content-Type' => 'text/html'}, ["#{@controller}##{@action}"]] + def dispatch(action, req) + [200, {'Content-Type' => 'text/html'}, ["#{@controller}##{action}"]] end end -- cgit v1.2.3