From f0dd77c6be6a86fe384bb0015151e0a497973d39 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Thu, 24 Sep 2009 14:01:31 -0700 Subject: Move railties/lib/* into railties/lib/* --- railties/test/console_app_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/test/console_app_test.rb') diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index f11de087e3..a26a8895ec 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -7,8 +7,8 @@ unless defined? ApplicationController ActionController::Base.session_store = nil end -require 'dispatcher' -require 'console_app' +require 'rails/dispatcher' +require 'rails/console_app' # console_app sets Test::Unit.run to work around the at_exit hook in test/unit, which kills IRB if Test::Unit.respond_to?(:run=) -- cgit v1.2.3 From 1f7270057596592946a877cd029d95760ba3e5ee Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 26 Sep 2009 13:41:32 -0500 Subject: Move default middleware stack into initializer --- railties/test/console_app_test.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'railties/test/console_app_test.rb') diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index a26a8895ec..d2512a4987 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -2,11 +2,6 @@ require 'abstract_unit' require 'action_controller' # console_app uses 'action_controller/integration' -unless defined? ApplicationController - class ApplicationController < ActionController::Base; end - ActionController::Base.session_store = nil -end - require 'rails/dispatcher' require 'rails/console_app' -- cgit v1.2.3 From 198081a639deded3df8a1a526cee66e951fb51ec Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 26 Sep 2009 19:57:36 -0500 Subject: Remove deprecated calls to Dispatcher.to_prepare --- railties/test/console_app_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/test/console_app_test.rb') diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index d2512a4987..7d697d4d05 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -22,9 +22,9 @@ if Test::Unit.respond_to?(:run=) def test_reload_should_fire_preparation_callbacks a = b = c = nil - Dispatcher.to_prepare { a = b = c = 1 } - Dispatcher.to_prepare { b = c = 2 } - Dispatcher.to_prepare { c = 3 } + ActionDispatch::Callbacks.to_prepare { a = b = c = 1 } + ActionDispatch::Callbacks.to_prepare { b = c = 2 } + ActionDispatch::Callbacks.to_prepare { c = 3 } ActionController::Routing::Routes.expects(:reload) reload! -- cgit v1.2.3 From a6757a02e12aa584bd74dbcde18a7886be8e9029 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Sat, 26 Sep 2009 21:59:28 -0500 Subject: Move middleware and route configuration from AC::Dispatcher to Rails application object --- railties/test/console_app_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'railties/test/console_app_test.rb') diff --git a/railties/test/console_app_test.rb b/railties/test/console_app_test.rb index 7d697d4d05..1437e6d885 100644 --- a/railties/test/console_app_test.rb +++ b/railties/test/console_app_test.rb @@ -5,6 +5,12 @@ require 'action_controller' # console_app uses 'action_controller/integration' require 'rails/dispatcher' require 'rails/console_app' +module Rails + def self.application + ActionController::Routing::Routes + end +end + # console_app sets Test::Unit.run to work around the at_exit hook in test/unit, which kills IRB if Test::Unit.respond_to?(:run=) Test::Unit.run = false -- cgit v1.2.3