diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-06 21:07:20 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-06 21:15:59 -0200 |
commit | 46332e458cc89ca9166099ad7609a4d65a12e48d (patch) | |
tree | b8f94f35e3264702fba5b4789ae294a91238a4e0 /actionpack/lib | |
parent | 2382667955df08599cb5df7bf3ef135817093d74 (diff) | |
download | rails-46332e458cc89ca9166099ad7609a4d65a12e48d.tar.gz rails-46332e458cc89ca9166099ad7609a4d65a12e48d.tar.bz2 rails-46332e458cc89ca9166099ad7609a4d65a12e48d.zip |
Move @assigns from the controller to the test itself
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/testing.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 1 |
2 files changed, 1 insertions, 1 deletions
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 |