Skip to content

Commit

Permalink
Reset html_scanner_document when doing a new request
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Jul 6, 2015
1 parent 788b78a commit 203b91f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions actionpack/lib/action_controller/test_case.rb
Expand Up @@ -601,6 +601,7 @@ def process(action, http_method = 'GET', *args)
parameters = paramify_values(parameters) if html_format?(parameters)

@html_document = nil
@html_scanner_document = nil

unless @controller.respond_to?(:recycle!)
@controller.extend(Testing::Functional)
Expand Down
2 changes: 2 additions & 0 deletions actionpack/lib/action_dispatch/testing/integration.rb
Expand Up @@ -301,6 +301,7 @@ def process(method, path, parameters = nil, headers_or_env = nil)
response = _mock_session.last_response
@response = ActionDispatch::TestResponse.from_response(response)
@html_document = nil
@html_scanner_document = nil
@url_options = nil

@controller = session.last_request.env['action_controller.instance']
Expand Down Expand Up @@ -338,6 +339,7 @@ def remove! # :nodoc:
# reset the html_document variable, except for cookies/assigns calls
unless method == 'cookies' || method == 'assigns'
@html_document = nil
@html_scanner_document = nil
reset_template_assertion
end

Expand Down
1 change: 1 addition & 0 deletions actionview/lib/action_view/test_case.rb
Expand Up @@ -242,6 +242,7 @@ def view
:@view_context_class,
:@_subscribers,
:@html_document
:@html_scanner_document
]

def _user_defined_ivars
Expand Down

0 comments on commit 203b91f

Please sign in to comment.