Skip to content

Commit

Permalink
Why do we add a top-level constant here?
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Apr 25, 2015
1 parent 9b36cf0 commit 9b3fa76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
8 changes: 3 additions & 5 deletions actionpack/test/controller/routing_test.rb
Expand Up @@ -8,8 +8,6 @@ def index() head :ok end
alias_method :show, :index
end

ROUTING = ActionDispatch::Routing

# See RFC 3986, section 3.3 for allowed path characters.
class UriReservedCharactersRoutingTest < ActiveSupport::TestCase
include RoutingTestHelpers
Expand Down Expand Up @@ -871,7 +869,7 @@ def request

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
Expand Down Expand Up @@ -1748,13 +1746,13 @@ def test_generate_with_default_params

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
Expand Down
6 changes: 2 additions & 4 deletions railties/test/path_generation_test.rb
Expand Up @@ -4,18 +4,16 @@
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
Expand Down

0 comments on commit 9b3fa76

Please sign in to comment.