提交 edc0f271 编写于 作者: M Matthew Draper

Merge pull request #15537 from tgxworld/fix_state_leak

Fix state leak.
......@@ -593,7 +593,6 @@ def process(action, http_method = 'GET', *args)
unless @controller.respond_to?(:recycle!)
@controller.extend(Testing::Functional)
@controller.class.class_eval { include Testing }
end
@request.recycle!
......
......@@ -2,6 +2,8 @@
module BareMetalTest
class BareController < ActionController::Metal
include ActionController::RackDelegation
def index
self.response_body = "Hello world"
end
......
......@@ -242,6 +242,8 @@ class MetalTestController < ActionController::Metal
include AbstractController::Rendering
include ActionView::Rendering
include ActionController::Rendering
include ActionController::RackDelegation
def accessing_logger_in_template
render :inline => "<%= logger.class %>"
......@@ -387,10 +389,6 @@ def test_last_modified_works_with_less_than_too
class EtagRenderTest < ActionController::TestCase
tests TestControllerWithExtraEtags
def setup
super
end
def test_multiple_etags
@request.if_none_match = etag(["123", 'ab', :cde, [:f]])
get :fresh
......
......@@ -9,6 +9,7 @@ def file_data() @data ||= File.open(file_path, 'rb') { |f| f.read } end
class SendFileController < ActionController::Base
include TestFileUtils
include ActionController::Testing
layout "layouts/standard" # to make sure layouts don't interfere
attr_writer :options
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册