diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-03 23:18:32 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-03 23:18:32 -0500 |
commit | 61411f2aeb29edba2d8cd2008020044799ea3d61 (patch) | |
tree | d2e6c4b5a30e27a9b8739ed6a050c30e7be70d20 /actionpack | |
parent | 8287a112c92aff73d45536f0942d9dc7ba107bd7 (diff) | |
download | rails-61411f2aeb29edba2d8cd2008020044799ea3d61.tar.gz rails-61411f2aeb29edba2d8cd2008020044799ea3d61.tar.bz2 rails-61411f2aeb29edba2d8cd2008020044799ea3d61.zip |
Redraw default routes on all internal integration tests. We don't need SimpleRouteCase anymore
Diffstat (limited to 'actionpack')
15 files changed, 34 insertions, 41 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index c1153b01de..950c85a34b 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -81,6 +81,12 @@ class ActionController::IntegrationTest < ActiveSupport::TestCase ActionController::Routing.const_set(:Routes, real_routes) if real_routes self.class.app = self.class.build_app end + + setup do + ActionController::Routing::Routes.draw do |map| + map.connect ':controller/:action/:id' + end + end end module ActionView @@ -160,9 +166,9 @@ module ActionController super end end - + Base.view_paths = FIXTURE_LOAD_PATH - + class TestCase include TestProcess @@ -214,11 +220,3 @@ module ActionController end end end - -class SimpleRouteCase < Rack::TestCase - setup do - ActionController::Routing::Routes.draw do |map| - map.connect ':controller/:action/:id' - end - end -end diff --git a/actionpack/test/controller/new_base/base_test.rb b/actionpack/test/controller/new_base/base_test.rb index effde324bc..1f9bf7f0fb 100644 --- a/actionpack/test/controller/new_base/base_test.rb +++ b/actionpack/test/controller/new_base/base_test.rb @@ -26,7 +26,7 @@ module Dispatching class ContainedEmptyController < ActionController::Base ; end end - class BaseTest < SimpleRouteCase + class BaseTest < Rack::TestCase # :api: plugin test "simple dispatching" do get "/dispatching/simple/index" diff --git a/actionpack/test/controller/new_base/content_negotiation_test.rb b/actionpack/test/controller/new_base/content_negotiation_test.rb index c43cb677f8..7b38a82f51 100644 --- a/actionpack/test/controller/new_base/content_negotiation_test.rb +++ b/actionpack/test/controller/new_base/content_negotiation_test.rb @@ -9,7 +9,7 @@ module ContentNegotiation )] end - class TestContentNegotiation < SimpleRouteCase + class TestContentNegotiation < Rack::TestCase test "A */* Accept header will return HTML" do get "/content_negotiation/basic/hello", {}, "HTTP_ACCEPT" => "*/*" assert_body "Hello world */*!" diff --git a/actionpack/test/controller/new_base/content_type_test.rb b/actionpack/test/controller/new_base/content_type_test.rb index 898d0bb9f3..0ff5552b08 100644 --- a/actionpack/test/controller/new_base/content_type_test.rb +++ b/actionpack/test/controller/new_base/content_type_test.rb @@ -44,7 +44,7 @@ module ContentType end end - class ExplicitContentTypeTest < SimpleRouteCase + class ExplicitContentTypeTest < Rack::TestCase test "default response is HTML and UTF8" do get "/content_type/base" @@ -67,7 +67,7 @@ module ContentType end end - class ImpliedContentTypeTest < SimpleRouteCase + class ImpliedContentTypeTest < Rack::TestCase test "sets Content-Type as text/html when rendering *.html.erb" do get "/content_type/implied/i_am_html_erb" @@ -93,7 +93,7 @@ module ContentType end end - class ExplicitCharsetTest < SimpleRouteCase + class ExplicitCharsetTest < Rack::TestCase test "setting the charset of the response directly on the response object" do get "/content_type/charset/set_on_response_obj" diff --git a/actionpack/test/controller/new_base/etag_test.rb b/actionpack/test/controller/new_base/etag_test.rb index d5b7942ab6..51bfb2278a 100644 --- a/actionpack/test/controller/new_base/etag_test.rb +++ b/actionpack/test/controller/new_base/etag_test.rb @@ -16,7 +16,7 @@ module Etags end end - class EtagTest < SimpleRouteCase + class EtagTest < Rack::TestCase describe "Rendering without any special etag options returns an etag that is an MD5 hash of its text" test "an action without a layout" do diff --git a/actionpack/test/controller/new_base/render_action_test.rb b/actionpack/test/controller/new_base/render_action_test.rb index d5896c1ebd..ecd29c4530 100644 --- a/actionpack/test/controller/new_base/render_action_test.rb +++ b/actionpack/test/controller/new_base/render_action_test.rb @@ -45,7 +45,7 @@ module RenderAction end - class RenderActionTest < SimpleRouteCase + class RenderActionTest < Rack::TestCase test "rendering an action using :action => <String>" do get "/render_action/basic/hello_world" @@ -82,7 +82,7 @@ module RenderAction end end - class RenderLayoutTest < SimpleRouteCase + class RenderLayoutTest < Rack::TestCase describe "Both <controller_path>.html.erb and application.html.erb are missing" test "rendering with layout => true" do @@ -150,7 +150,7 @@ module RenderActionWithApplicationLayout end end - class LayoutTest < SimpleRouteCase + class LayoutTest < Rack::TestCase describe "Only application.html.erb is present and <controller_path>.html.erb is missing" test "rendering implicit application.html.erb as layout" do @@ -189,7 +189,7 @@ module RenderActionWithApplicationLayout end end - class TestLayout < SimpleRouteCase + class TestLayout < Rack::TestCase testing BasicController test "builder works with layouts" do @@ -228,7 +228,7 @@ module RenderActionWithControllerLayout end end - class ControllerLayoutTest < SimpleRouteCase + class ControllerLayoutTest < Rack::TestCase describe "Only <controller_path>.html.erb is present and application.html.erb is missing" test "render hello_world and implicitly use <controller_path>.html.erb as a layout." do @@ -286,7 +286,7 @@ module RenderActionWithBothLayouts end end - class ControllerLayoutTest < SimpleRouteCase + class ControllerLayoutTest < Rack::TestCase describe "Both <controller_path>.html.erb and application.html.erb are present" test "rendering implicitly use <controller_path>.html.erb over application.html.erb as a layout" do diff --git a/actionpack/test/controller/new_base/render_file_test.rb b/actionpack/test/controller/new_base/render_file_test.rb index 864469e0ae..8b2fdf8f96 100644 --- a/actionpack/test/controller/new_base/render_file_test.rb +++ b/actionpack/test/controller/new_base/render_file_test.rb @@ -48,7 +48,7 @@ module RenderFile end end - class TestBasic < SimpleRouteCase + class TestBasic < Rack::TestCase testing RenderFile::BasicController test "rendering simple template" do diff --git a/actionpack/test/controller/new_base/render_implicit_action_test.rb b/actionpack/test/controller/new_base/render_implicit_action_test.rb index 2b78fa7d4f..90cc7933ff 100644 --- a/actionpack/test/controller/new_base/render_implicit_action_test.rb +++ b/actionpack/test/controller/new_base/render_implicit_action_test.rb @@ -10,7 +10,7 @@ module RenderImplicitAction def hello_world() end end - class RenderImplicitActionTest < SimpleRouteCase + class RenderImplicitActionTest < Rack::TestCase test "render a simple action with new explicit call to render" do get "/render_implicit_action/simple/hello_world" diff --git a/actionpack/test/controller/new_base/render_layout_test.rb b/actionpack/test/controller/new_base/render_layout_test.rb index f840a47ecf..6a9668b81a 100644 --- a/actionpack/test/controller/new_base/render_layout_test.rb +++ b/actionpack/test/controller/new_base/render_layout_test.rb @@ -36,7 +36,7 @@ module ControllerLayouts end end - class RenderLayoutTest < SimpleRouteCase + class RenderLayoutTest < Rack::TestCase test "rendering a normal template, but using the implicit layout" do get "/controller_layouts/implicit/index" @@ -58,7 +58,7 @@ module ControllerLayouts end - class LayoutOptionsTest < SimpleRouteCase + class LayoutOptionsTest < Rack::TestCase testing ControllerLayouts::ImplicitController test "rendering with :layout => false leaves out the implicit layout" do @@ -79,7 +79,7 @@ module ControllerLayouts end end - class MismatchFormatTest < SimpleRouteCase + class MismatchFormatTest < Rack::TestCase testing ControllerLayouts::MismatchFormatController test "if JS is selected, an HTML template is not also selected" do diff --git a/actionpack/test/controller/new_base/render_partial_test.rb b/actionpack/test/controller/new_base/render_partial_test.rb index 7c2c20e1c7..8fddcbcd57 100644 --- a/actionpack/test/controller/new_base/render_partial_test.rb +++ b/actionpack/test/controller/new_base/render_partial_test.rb @@ -15,7 +15,7 @@ module RenderPartial end end - class TestPartial < SimpleRouteCase + class TestPartial < Rack::TestCase testing BasicController test "rendering a partial in ActionView doesn't pull the ivars again from the controller" do diff --git a/actionpack/test/controller/new_base/render_rjs_test.rb b/actionpack/test/controller/new_base/render_rjs_test.rb index 7b76c54ab9..8c47b38ab6 100644 --- a/actionpack/test/controller/new_base/render_rjs_test.rb +++ b/actionpack/test/controller/new_base/render_rjs_test.rb @@ -21,7 +21,7 @@ module RenderRjs end end - class TestBasic < SimpleRouteCase + class TestBasic < Rack::TestCase testing BasicController def setup diff --git a/actionpack/test/controller/new_base/render_template_test.rb b/actionpack/test/controller/new_base/render_template_test.rb index 3b24c2d75a..c81b951c0d 100644 --- a/actionpack/test/controller/new_base/render_template_test.rb +++ b/actionpack/test/controller/new_base/render_template_test.rb @@ -39,7 +39,7 @@ module RenderTemplate end end - class TestWithoutLayout < SimpleRouteCase + class TestWithoutLayout < Rack::TestCase testing RenderTemplate::WithoutLayoutController test "rendering a normal template with full path without layout" do @@ -107,7 +107,7 @@ module RenderTemplate end end - class TestWithLayout < SimpleRouteCase + class TestWithLayout < Rack::TestCase describe "Rendering with :template using implicit or explicit layout" test "rendering with implicit layout" do @@ -158,7 +158,7 @@ module RenderTemplate end end - class TestTemplateRenderWithForwardSlash < SimpleRouteCase + class TestTemplateRenderWithForwardSlash < Rack::TestCase test "rendering a normal template with full path starting with a leading slash" do get "/render_template/compatibility/without_layout/with_forward_slash" diff --git a/actionpack/test/controller/new_base/render_test.rb b/actionpack/test/controller/new_base/render_test.rb index 804be79d17..d985d9f9ad 100644 --- a/actionpack/test/controller/new_base/render_test.rb +++ b/actionpack/test/controller/new_base/render_test.rb @@ -35,7 +35,7 @@ module Render end end - class RenderTest < SimpleRouteCase + class RenderTest < Rack::TestCase test "render with blank" do get "/render/blank_render" @@ -50,7 +50,7 @@ module Render end end - class TestOnlyRenderPublicActions < SimpleRouteCase + class TestOnlyRenderPublicActions < Rack::TestCase describe "Only public methods on actual controllers are callable actions" test "raises an exception when a method of Object is called" do @@ -66,7 +66,7 @@ module Render end end - class TestVariousObjectsAvailableInView < SimpleRouteCase + class TestVariousObjectsAvailableInView < Rack::TestCase test "The request object is accessible in the view" do get "/render/blank_render/access_request" assert_body "The request: GET" diff --git a/actionpack/test/controller/new_base/render_text_test.rb b/actionpack/test/controller/new_base/render_text_test.rb index f5839ee16f..0e6f51c998 100644 --- a/actionpack/test/controller/new_base/render_text_test.rb +++ b/actionpack/test/controller/new_base/render_text_test.rb @@ -62,7 +62,7 @@ module RenderText end end - class RenderTextTest < SimpleRouteCase + class RenderTextTest < Rack::TestCase describe "Rendering text using render :text" test "rendering text from a action with default options renders the text with the layout" do diff --git a/actionpack/test/lib/controller/fake_controllers.rb b/actionpack/test/lib/controller/fake_controllers.rb index 7a0216e73c..9ec7f330b8 100644 --- a/actionpack/test/lib/controller/fake_controllers.rb +++ b/actionpack/test/lib/controller/fake_controllers.rb @@ -44,8 +44,3 @@ class ChannelsController < SpeedController; end class ChannelVideosController < SpeedController; end class LostPasswordsController < SpeedController; end class PagesController < SpeedController; end - -ActionController::Routing::Routes.draw do |map| - map.route_one 'route_one', :controller => 'elsewhere', :action => 'flash_me' - map.connect ':controller/:action/:id' -end |