aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/fake_controllers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/fake_controllers.rb')
-rw-r--r--actionpack/test/controller/fake_controllers.rb24
1 files changed, 7 insertions, 17 deletions
diff --git a/actionpack/test/controller/fake_controllers.rb b/actionpack/test/controller/fake_controllers.rb
index 28136e09e8..8c626acab3 100644
--- a/actionpack/test/controller/fake_controllers.rb
+++ b/actionpack/test/controller/fake_controllers.rb
@@ -1,21 +1,11 @@
-module Object::Controllers
- def self.const_available?(*args)
- const_defined?(*args)
- end
+class << Object; alias_method :const_available?, :const_defined?; end
- class ContentController < ActionController::Base
- end
-
- module Admin
- def self.const_available?(*args)
- const_defined?(*args)
- end
-
- class UserController < ActionController::Base
- end
- class NewsFeedController < ActionController::Base
- end
- end
+class ContentController < Class.new(ActionController::Base)
+end
+module Admin
+ class << self; alias_method :const_available?, :const_defined?; end
+ class UserController < Class.new(ActionController::Base); end
+ class NewsFeedController < Class.new(ActionController::Base); end
end
ActionController::Routing::Routes.draw do |map|