Permalink
Browse files

Move @assigns from the controller to the test itself

  • Loading branch information...
1 parent 2382667 commit 46332e458cc89ca9166099ad7609a4d65a12e48d @spastorino spastorino committed Nov 6, 2010
@@ -14,7 +14,6 @@ def process_with_new_base_test(request, response)
cookies.write(@_response)
end
@_response.prepare!
- @assigns = respond_to?(:view_assigns) ? view_assigns : {}
ret
end
@@ -413,6 +413,7 @@ def process(action, parameters = nil, session = nil, flash = nil, http_method =
build_request_uri(action, parameters)
@controller.class.class_eval { include Testing }
@controller.process_with_new_base_test(@request, @response)
+ @assigns = @controller.respond_to?(:view_assigns) ? @controller.view_assigns : {}
@request.session.delete('flash') if @request.session['flash'].blank?
@response
end

0 comments on commit 46332e4

Please sign in to comment.