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:
parent
b6081f3634
commit
6f04ec1ee1
1 changed files with 4 additions and 1 deletions
|
@ -69,7 +69,10 @@ end
|
||||||
module ActionDispatch
|
module ActionDispatch
|
||||||
module SharedRoutes
|
module SharedRoutes
|
||||||
def before_setup
|
def before_setup
|
||||||
@routes = SharedTestRoutes
|
@routes = Routing::RouteSet.new
|
||||||
|
ActiveSupport::Deprecation.silence do
|
||||||
|
@routes.draw { get ":controller(/:action)" }
|
||||||
|
end
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue