From f90160c6c1ec457f0b4b01c6fef78146271bc070 Mon Sep 17 00:00:00 2001 From: ddemaree Date: Fri, 2 Jan 2009 10:31:21 -0600 Subject: Fixed bug where calling app method from console would raise ArgumentError [#1629 state:resolved] Signed-off-by: Joshua Peek --- actionpack/lib/action_controller/integration.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb index a8e54c2fc7..d9899112c3 100644 --- a/actionpack/lib/action_controller/integration.rb +++ b/actionpack/lib/action_controller/integration.rb @@ -81,8 +81,8 @@ module ActionController end # Create and initialize a new Session instance. - def initialize(app) - @application = app + def initialize(app = nil) + @application = app || ActionController::Dispatcher.new reset! end @@ -591,7 +591,6 @@ EOF # can use this method to open multiple sessions that ought to be tested # simultaneously. def open_session(application = nil) - application ||= ActionController::Dispatcher.new session = Integration::Session.new(application) # delegate the fixture accessors back to the test instance -- cgit v1.2.3