提交 3bad24c8 编写于 作者: C Carlhuda

Remove traces of SharedTestRoutes from user code; leave it as a standin for...

Remove traces of SharedTestRoutes from user code; leave it as a standin for Rails.application.routes in Rails internal tests
上级 5797575b
......@@ -33,7 +33,6 @@ class Railtie < Rails::Railtie
initializer "action_controller.url_helpers" do |app|
ActionController::Base.extend ::ActionController::Railtie::UrlHelpers.with(app.routes)
ActionController::Routing::Routes = app.routes
::SharedTestRoutes = app.routes
end
end
end
\ No newline at end of file
......@@ -219,18 +219,6 @@ def host!(name)
@host = name
end
# # Returns the URL for the given options, according to the rules specified
# # in the application's routes.
# def url_for(options)
# # ROUTES TODO: @app.router is not guaranteed to exist, so a generic Rack
# # application will not work here. This means that a generic Rack application
# # integration test cannot call url_for, since the application will not have
# # #router on it.
# controller ?
# controller.url_for(options) :
# generic_url_rewriter.rewrite(SharedTestRoutes, options)
# end
private
# Performs the actual request.
......
......@@ -257,7 +257,6 @@ def assert_template(options = {}, message = nil)
# This stub emulates the Railtie including the URL helpers from a Rails application
module ActionController
class Base
# ROUTES TODO: Rename SharedTestRoutes to something that reflects it's a standin for Rails.application
include SharedTestRoutes.url_helpers
end
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册