Cleaning Route generation tests

This commit is contained in:
Thiago Pradi 2012-02-12 03:09:03 -02:00
parent 5138a8f254
commit c0a1a86693
2 changed files with 2 additions and 58 deletions

View File

@ -242,36 +242,6 @@ class LegacyRouteSetTests < ActiveSupport::TestCase
test_default_setup
end
def test_time_recognition
# We create many routes to make situation more realistic
@rs = ::ActionDispatch::Routing::RouteSet.new
@rs.draw {
root :to => "search#new", :as => "frontpage"
resources :videos do
resources :comments
resource :file, :controller => 'video_file'
resource :share, :controller => 'video_shares'
resource :abuse, :controller => 'video_abuses'
end
resources :abuses, :controller => 'video_abuses'
resources :video_uploads
resources :video_visits
resources :users do
resource :settings
resources :videos
end
resources :channels do
resources :videos, :controller => 'channel_videos'
end
resource :session
resource :lost_password
match 'search' => 'search#index', :as => 'search'
resources :pages
match ':controller/:action/:id'
}
end
def test_route_with_colon_first
rs.draw do
match '/:controller/:action/:id', :action => 'index', :id => nil

View File

@ -1,11 +1,7 @@
class << Object; alias_method :const_available?, :const_defined?; end
class ContentController < ActionController::Base; end
module Admin
class << self; alias_method :const_available?, :const_defined?; end
class AccountsController < ActionController::Base; end
class NewsFeedController < ActionController::Base; end
class PostsController < ActionController::Base; end
class StuffController < ActionController::Base; end
class UserController < ActionController::Base; end
@ -17,7 +13,6 @@ module Api
class ProductsController < ActionController::Base; end
end
# TODO: Reduce the number of test controllers we use
class AccountController < ActionController::Base; end
class AddressesController < ActionController::Base; end
class ArchiveController < ActionController::Base; end
@ -25,38 +20,17 @@ class ArticlesController < ActionController::Base; end
class BarController < ActionController::Base; end
class BlogController < ActionController::Base; end
class BooksController < ActionController::Base; end
class BraveController < ActionController::Base; end
class CarsController < ActionController::Base; end
class CcController < ActionController::Base; end
class CController < ActionController::Base; end
class ElsewhereController < ActionController::Base; end
class FooController < ActionController::Base; end
class GeocodeController < ActionController::Base; end
class HiController < ActionController::Base; end
class ImageController < ActionController::Base; end
class NewsController < ActionController::Base; end
class NotesController < ActionController::Base; end
class PagesController < ActionController::Base; end
class PeopleController < ActionController::Base; end
class PostsController < ActionController::Base; end
class SessionsController < ActionController::Base; end
class StuffController < ActionController::Base; end
class SubpathBooksController < ActionController::Base; end
class SymbolsController < ActionController::Base; end
class UserController < ActionController::Base; end
class WeblogController < ActionController::Base; end
# For speed test
class SpeedController < ActionController::Base; end
class SearchController < SpeedController; end
class VideosController < SpeedController; end
class VideoFileController < SpeedController; end
class VideoSharesController < SpeedController; end
class VideoAbusesController < SpeedController; end
class VideoUploadsController < SpeedController; end
class VideoVisitsController < SpeedController; end
class UsersController < SpeedController; end
class SettingsController < SpeedController; end
class ChannelsController < SpeedController; end
class ChannelVideosController < SpeedController; end
class LostPasswordsController < SpeedController; end
class PagesController < SpeedController; end
class UsersController < ActionController::Base; end