aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/abstract_unit.rb')
-rw-r--r--actionview/test/abstract_unit.rb58
1 files changed, 4 insertions, 54 deletions
diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb
index 8213997f4e..6623b47e83 100644
--- a/actionview/test/abstract_unit.rb
+++ b/actionview/test/abstract_unit.rb
@@ -24,7 +24,6 @@ require 'action_dispatch'
require 'active_support/dependencies'
require 'active_model'
require 'active_record'
-require 'action_controller/caching'
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
@@ -268,6 +267,10 @@ class Rack::TestCase < ActionDispatch::IntegrationTest
end
end
+# Emulate AV railtie.
+ActionController::Base.superclass.send(:include, ActionView::Layouts)
+ActionView::RoutingUrlFor.send(:include, ActionDispatch::Routing::UrlFor)
+
module ActionController
class Base
include ActionController::Testing
@@ -290,9 +293,6 @@ module ActionController
end
end
-class ::ApplicationController < ActionController::Base
-end
-
module ActionView
class TestCase
# Must repeat the setup because AV::TestCase is a duplication
@@ -330,53 +330,3 @@ module ActionDispatch
end
end
-module ActionDispatch
- module RoutingVerbs
- def get(uri_or_host, path = nil)
- host = uri_or_host.host unless path
- path ||= uri_or_host.path
-
- params = {'PATH_INFO' => path,
- 'REQUEST_METHOD' => 'GET',
- 'HTTP_HOST' => host}
-
- routes.call(params)[2].join
- end
- end
-end
-
-module RoutingTestHelpers
- def url_for(set, options, recall = nil)
- set.send(:url_for, options.merge(:only_path => true, :_recall => recall))
- end
-end
-
-class ResourcesController < ActionController::Base
- def index() render :nothing => true end
- alias_method :show, :index
-end
-
-class ThreadsController < ResourcesController; end
-class MessagesController < ResourcesController; end
-class CommentsController < ResourcesController; end
-class ReviewsController < ResourcesController; end
-class AuthorsController < ResourcesController; end
-class LogosController < ResourcesController; end
-
-class AccountsController < ResourcesController; end
-class AdminController < ResourcesController; end
-class ProductsController < ResourcesController; end
-class ImagesController < ResourcesController; end
-class PreferencesController < ResourcesController; end
-
-module Backoffice
- class ProductsController < ResourcesController; end
- class TagsController < ResourcesController; end
- class ManufacturersController < ResourcesController; end
- class ImagesController < ResourcesController; end
-
- module Admin
- class ProductsController < ResourcesController; end
- class ImagesController < ResourcesController; end
- end
-end