From 46332e458cc89ca9166099ad7609a4d65a12e48d Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 6 Nov 2010 21:07:20 -0200 Subject: Move @assigns from the controller to the test itself --- actionpack/lib/action_controller/metal/testing.rb | 1 - actionpack/lib/action_controller/test_case.rb | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/testing.rb b/actionpack/lib/action_controller/metal/testing.rb index 01fd55e1dd..f4efeb33ba 100644 --- a/actionpack/lib/action_controller/metal/testing.rb +++ b/actionpack/lib/action_controller/metal/testing.rb @@ -14,7 +14,6 @@ module ActionController cookies.write(@_response) end @_response.prepare! - @assigns = respond_to?(:view_assigns) ? view_assigns : {} ret end diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index cc27233049..2b2f647d32 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -413,6 +413,7 @@ module ActionController 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 -- cgit v1.2.3