1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Stop using a singleton for routes

This change ensures we're no longer using a singleton for routes because
we want to change the routing table based on the controller we're
testing. We don't want the routing table to be global for the Action
Pack tests.

Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
This commit is contained in:
eileencodes 2020-07-14 13:45:41 -04:00
parent b6081f3634
commit 6f04ec1ee1
No known key found for this signature in database
GPG key ID: BA5C575120BBE8DF

View file

@ -69,7 +69,10 @@ end
module ActionDispatch
module SharedRoutes
def before_setup
@routes = SharedTestRoutes
@routes = Routing::RouteSet.new
ActiveSupport::Deprecation.silence do
@routes.draw { get ":controller(/:action)" }
end
super
end
end