aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-10-03 23:03:08 -0500
committerJoshua Peek <josh@joshpeek.com>2009-10-03 23:03:08 -0500
commit8287a112c92aff73d45536f0942d9dc7ba107bd7 (patch)
tree4951e7acdc4bb7152ae2d7c4e763b37bb571d617 /actionpack/test/lib
parent2a938ad5e773c35bfaec282a150e77032563f059 (diff)
downloadrails-8287a112c92aff73d45536f0942d9dc7ba107bd7.tar.gz
rails-8287a112c92aff73d45536f0942d9dc7ba107bd7.tar.bz2
rails-8287a112c92aff73d45536f0942d9dc7ba107bd7.zip
Avoid creating new controller constants during test runtime. All routable controllers should be defined beforehand.
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r--actionpack/test/lib/controller/fake_controllers.rb27
1 files changed, 18 insertions, 9 deletions
diff --git a/actionpack/test/lib/controller/fake_controllers.rb b/actionpack/test/lib/controller/fake_controllers.rb
index 2e8c5090ca..7a0216e73c 100644
--- a/actionpack/test/lib/controller/fake_controllers.rb
+++ b/actionpack/test/lib/controller/fake_controllers.rb
@@ -1,24 +1,33 @@
class << Object; alias_method :const_available?, :const_defined?; end
-class ContentController < ActionController::Base
-end
-class NotAController
-end
+class ContentController < ActionController::Base; end
+class NotAController; end
+
module Admin
class << self; alias_method :const_available?, :const_defined?; end
class UserController < ActionController::Base; end
class NewsFeedController < ActionController::Base; end
end
-class ElsewhereController < ActionController::Base; end
+
+module Api
+ class ProductsController < ActionController::Base; end
+end
+
+# TODO: Reduce the number of test controllers we use
class AddressesController < ActionController::Base; end
-class SessionsController < ActionController::Base; end
-class FooController < ActionController::Base; end
+class ArticlesController < ActionController::Base; end
+class BarController < ActionController::Base; end
+class BooksController < ActionController::Base; end
+class BraveController < ActionController::Base; end
class CController < ActionController::Base; end
+class ElsewhereController < ActionController::Base; end
+class FooController < ActionController::Base; end
class HiController < ActionController::Base; end
-class BraveController < ActionController::Base; end
class ImageController < ActionController::Base; end
+class PeopleController < ActionController::Base; end
+class SessionsController < ActionController::Base; end
+class SubpathBooksController < ActionController::Base; end
class WeblogController < ActionController::Base; end
-class BarController < ActionController::Base; end
# For speed test
class SpeedController < ActionController::Base; end