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

Why do we add a top-level constant here?

This commit is contained in:
Akira Matsuda 2015-04-25 08:42:28 +09:00
parent 9b36cf0fa4
commit 9b3fa766d4
2 changed files with 5 additions and 9 deletions

View file

@ -8,8 +8,6 @@ class MilestonesController < ActionController::Base
alias_method :show, :index
end
ROUTING = ActionDispatch::Routing
# See RFC 3986, section 3.3 for allowed path characters.
class UriReservedCharactersRoutingTest < ActiveSupport::TestCase
include RoutingTestHelpers
@ -871,7 +869,7 @@ class RouteSetTest < ActiveSupport::TestCase
def default_route_set
@default_route_set ||= begin
set = ROUTING::RouteSet.new
set = ActionDispatch::Routing::RouteSet.new
set.draw do
get '/:controller(/:action(/:id))'
end
@ -1748,13 +1746,13 @@ class RouteSetTest < ActiveSupport::TestCase
include ActionDispatch::RoutingVerbs
class TestSet < ROUTING::RouteSet
class TestSet < ActionDispatch::Routing::RouteSet
def initialize(block)
@block = block
super()
end
class Dispatcher < ROUTING::RouteSet::Dispatcher
class Dispatcher < ActionDispatch::Routing::RouteSet::Dispatcher
def initialize(defaults, set, block)
super(defaults)
@block = block

View file

@ -4,18 +4,16 @@ require 'active_support/core_ext/object/json'
require 'rails'
require 'rails/application'
ROUTING = ActionDispatch::Routing
class PathGenerationTest < ActiveSupport::TestCase
attr_reader :app
class TestSet < ROUTING::RouteSet
class TestSet < ActionDispatch::Routing::RouteSet
def initialize(block)
@block = block
super()
end
class Dispatcher < ROUTING::RouteSet::Dispatcher
class Dispatcher < ActionDispatch::Routing::RouteSet::Dispatcher
def initialize(defaults, set, block)
super(defaults)
@block = block