diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-11-08 11:02:26 +0000 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-11-08 11:02:26 +0000 |
commit | e05162cffad7ae86615c21c6b54ab161d0261c39 (patch) | |
tree | c02e6faf12c2ce50ef4ac40342daf488d7fa0f8d /actionpack/lib/action_controller/test_case.rb | |
parent | 083d6f267611472b8acfb9801e64971ee6d19994 (diff) | |
parent | 4e0477c9b75683372f662a614ae91b158120ebe8 (diff) | |
download | rails-e05162cffad7ae86615c21c6b54ab161d0261c39.tar.gz rails-e05162cffad7ae86615c21c6b54ab161d0261c39.tar.bz2 rails-e05162cffad7ae86615c21c6b54ab161d0261c39.zip |
Merge branch 'master' into nested_has_many_through
Conflicts:
activerecord/lib/active_record/associations.rb
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 0c26071379..2b2f647d32 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -411,8 +411,9 @@ module ActionController @controller.request = @request @controller.params.merge!(parameters) build_request_uri(action, parameters) - Base.class_eval { include Testing } + @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 @@ -448,7 +449,7 @@ module ActionController def build_request_uri(action, parameters) unless @request.env["PATH_INFO"] - options = @controller.__send__(:url_options).merge(parameters) + options = @controller.respond_to?(:url_options) ? @controller.__send__(:url_options).merge(parameters) : parameters options.update( :only_path => true, :action => action, |