aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/mapper_test.rb3
-rw-r--r--actionpack/test/dispatch/routing_test.rb49
-rw-r--r--actionpack/test/fixtures/routes/bogus.rb1
-rw-r--r--actionpack/test/fixtures/routes/external.rb1
4 files changed, 1 insertions, 53 deletions
diff --git a/actionpack/test/dispatch/mapper_test.rb b/actionpack/test/dispatch/mapper_test.rb
index bd078d2b21..8070bdec8a 100644
--- a/actionpack/test/dispatch/mapper_test.rb
+++ b/actionpack/test/dispatch/mapper_test.rb
@@ -4,12 +4,11 @@ module ActionDispatch
module Routing
class MapperTest < ActiveSupport::TestCase
class FakeSet
- attr_reader :routes, :draw_paths
+ attr_reader :routes
alias :set :routes
def initialize
@routes = []
- @draw_paths = []
end
def resources_path_names
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index f15dd7214b..fed26d89f8 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -2324,55 +2324,6 @@ class TestNamespaceWithControllerOption < ActionDispatch::IntegrationTest
end
end
-class TestDrawExternalFile < ActionDispatch::IntegrationTest
- class ExternalController < ActionController::Base
- def index
- render :text => "external#index"
- end
- end
-
- DRAW_PATH = File.expand_path('../../fixtures/routes', __FILE__)
-
- DefaultScopeRoutes = ActionDispatch::Routing::RouteSet.new.tap do |app|
- app.draw_paths << DRAW_PATH
- end
-
- def app
- DefaultScopeRoutes
- end
-
- def test_draw_external_file
- DefaultScopeRoutes.draw do
- scope :module => 'test_draw_external_file' do
- draw :external
- end
- end
-
- get '/external'
- assert_equal "external#index", @response.body
- end
-
- def test_draw_nonexistent_file
- exception = assert_raise ArgumentError do
- DefaultScopeRoutes.draw do
- draw :nonexistent
- end
- end
- assert_match 'Your router tried to #draw the external file nonexistent.rb', exception.message
- assert_match DRAW_PATH.to_s, exception.message
- end
-
- def test_draw_bogus_file
- exception = assert_raise NoMethodError do
- DefaultScopeRoutes.draw do
- draw :bogus
- end
- end
- assert_match "undefined method `wrong'", exception.message
- assert_match 'test/fixtures/routes/bogus.rb:1', exception.backtrace.first
- end
-end
-
class TestDefaultScope < ActionDispatch::IntegrationTest
module ::Blog
class PostsController < ActionController::Base
diff --git a/actionpack/test/fixtures/routes/bogus.rb b/actionpack/test/fixtures/routes/bogus.rb
deleted file mode 100644
index 41fbf0cd64..0000000000
--- a/actionpack/test/fixtures/routes/bogus.rb
+++ /dev/null
@@ -1 +0,0 @@
-wrong :route
diff --git a/actionpack/test/fixtures/routes/external.rb b/actionpack/test/fixtures/routes/external.rb
deleted file mode 100644
index d103c39f53..0000000000
--- a/actionpack/test/fixtures/routes/external.rb
+++ /dev/null
@@ -1 +0,0 @@
-get '/external' => 'external#index'