mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
A few more tweaks to get new Base running old render tests again
This commit is contained in:
parent
e046f36824
commit
7dd072d333
3 changed files with 10 additions and 17 deletions
|
@ -10,10 +10,14 @@ module ActionController
|
||||||
|
|
||||||
# Ported modules
|
# Ported modules
|
||||||
# require 'action_controller/routing'
|
# require 'action_controller/routing'
|
||||||
autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
|
autoload :Dispatcher, 'action_controller/dispatch/dispatcher'
|
||||||
autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
|
autoload :PolymorphicRoutes, 'action_controller/routing/generation/polymorphic_routes'
|
||||||
autoload :Resources, 'action_controller/routing/resources'
|
autoload :RecordIdentifier, 'action_controller/record_identifier'
|
||||||
|
autoload :Resources, 'action_controller/routing/resources'
|
||||||
autoload :SessionManagement, 'action_controller/base/session_management'
|
autoload :SessionManagement, 'action_controller/base/session_management'
|
||||||
|
autoload :TestCase, 'action_controller/testing/test_case'
|
||||||
|
autoload :UrlRewriter, 'action_controller/routing/generation/url_rewriter'
|
||||||
|
autoload :UrlWriter, 'action_controller/routing/generation/url_rewriter'
|
||||||
|
|
||||||
require 'action_controller/routing'
|
require 'action_controller/routing'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require "action_controller/testing/process"
|
require "action_controller/testing/process"
|
||||||
|
|
||||||
module ActionController
|
module ActionController
|
||||||
module TestProcess2
|
module TestProcess
|
||||||
|
|
||||||
# Executes a request simulating GET HTTP method and set/volley the response
|
# Executes a request simulating GET HTTP method and set/volley the response
|
||||||
def get(action, parameters = nil, session = nil, flash = nil)
|
def get(action, parameters = nil, session = nil, flash = nil)
|
||||||
|
@ -60,7 +60,7 @@ module ActionController
|
||||||
options.update(:only_path => true, :action => action)
|
options.update(:only_path => true, :action => action)
|
||||||
|
|
||||||
url = ActionController::UrlRewriter.new(@request, parameters)
|
url = ActionController::UrlRewriter.new(@request, parameters)
|
||||||
@request.set_REQUEST_URI(url.rewrite(options))
|
@request.request_uri = url.rewrite(options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,6 @@ $:.unshift(File.dirname(__FILE__) + '/../lib')
|
||||||
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
$:.unshift(File.dirname(__FILE__) + '/../../activesupport/lib')
|
||||||
$:.unshift(File.dirname(__FILE__) + '/lib')
|
$:.unshift(File.dirname(__FILE__) + '/lib')
|
||||||
|
|
||||||
# HAX
|
|
||||||
module ActionController
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
# TestCase
|
|
||||||
# include TestProcess2
|
|
||||||
|
|
||||||
|
|
||||||
require 'test/unit'
|
require 'test/unit'
|
||||||
require 'active_support'
|
require 'active_support'
|
||||||
|
@ -17,16 +9,13 @@ require 'active_support/core/all'
|
||||||
require 'active_support/test_case'
|
require 'active_support/test_case'
|
||||||
require 'action_controller/abstract'
|
require 'action_controller/abstract'
|
||||||
require 'action_controller/new_base'
|
require 'action_controller/new_base'
|
||||||
require 'action_controller/new_base/base'
|
|
||||||
require 'action_controller/new_base/renderer' # HAX
|
|
||||||
require 'action_controller'
|
|
||||||
require 'fixture_template'
|
require 'fixture_template'
|
||||||
|
require 'action_controller/testing/process2'
|
||||||
require 'action_view/test_case'
|
require 'action_view/test_case'
|
||||||
|
|
||||||
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
|
FIXTURE_LOAD_PATH = File.join(File.dirname(__FILE__), 'fixtures')
|
||||||
|
|
||||||
module ActionController
|
module ActionController
|
||||||
autoload :TestProcess2, 'action_controller/testing/process2'
|
|
||||||
|
|
||||||
class ActionControllerError < StandardError #:nodoc:
|
class ActionControllerError < StandardError #:nodoc:
|
||||||
end
|
end
|
||||||
|
@ -158,7 +147,7 @@ module ActionController
|
||||||
Base.view_paths = FIXTURE_LOAD_PATH
|
Base.view_paths = FIXTURE_LOAD_PATH
|
||||||
|
|
||||||
class TestCase
|
class TestCase
|
||||||
include TestProcess2
|
include TestProcess
|
||||||
setup do
|
setup do
|
||||||
ActionController::Routing::Routes.draw do |map|
|
ActionController::Routing::Routes.draw do |map|
|
||||||
map.connect ':controller/:action/:id'
|
map.connect ':controller/:action/:id'
|
||||||
|
|
Loading…
Reference in a new issue