aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJon Moss <maclover7@users.noreply.github.com>2016-05-31 11:21:30 -0400
committerSean Griffin <sean@seantheprogrammer.com>2016-05-31 11:21:30 -0400
commit81251c6d99eda71d8c8d748cfd3710242aece142 (patch)
tree88f36c6aa5e80281f85f8425b1a05e3a5912f6a5 /actionpack/test/controller
parente4fc16a54561d773183ccee58434b81192a3349a (diff)
downloadrails-81251c6d99eda71d8c8d748cfd3710242aece142.tar.gz
rails-81251c6d99eda71d8c8d748cfd3710242aece142.tar.bz2
rails-81251c6d99eda71d8c8d748cfd3710242aece142.zip
More Action Pack `abstract_unit` cleanup (#25211)
- Remove dead classes / dead code - Move class definitions to where they are used, don't define in a shared space
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/metal/renderers_test.rb6
-rw-r--r--actionpack/test/controller/resources_test.rb16
2 files changed, 21 insertions, 1 deletions
diff --git a/actionpack/test/controller/metal/renderers_test.rb b/actionpack/test/controller/metal/renderers_test.rb
index 007866a559..247e872674 100644
--- a/actionpack/test/controller/metal/renderers_test.rb
+++ b/actionpack/test/controller/metal/renderers_test.rb
@@ -1,6 +1,12 @@
require 'abstract_unit'
require 'active_support/core_ext/hash/conversions'
+class MetalRenderingController < ActionController::Metal
+ include AbstractController::Rendering
+ include ActionController::Rendering
+ include ActionController::Renderers
+end
+
class MetalRenderingJsonController < MetalRenderingController
class Model
def to_json(options = {})
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 4490abf7b2..8e38af5025 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -3,8 +3,22 @@ require 'active_support/core_ext/object/try'
require 'active_support/core_ext/object/with_options'
require 'active_support/core_ext/array/extract_options'
-class ResourcesTest < ActionController::TestCase
+class AdminController < ResourcesController; end
+class MessagesController < ResourcesController; end
+class ProductsController < ResourcesController; end
+class ThreadsController < ResourcesController; end
+
+module Backoffice
+ class ProductsController < ResourcesController; end
+ class ImagesController < ResourcesController; end
+
+ module Admin
+ class ProductsController < ResourcesController; end
+ class ImagesController < ResourcesController; end
+ end
+end
+class ResourcesTest < ActionController::TestCase
def test_default_restful_routes
with_restful_routing :messages do
assert_simply_restful_for :messages