diff options
| author | eparreno <emili@eparreno.com> | 2010-11-15 22:16:17 +0100 |
|---|---|---|
| committer | eparreno <emili@eparreno.com> | 2010-11-15 22:16:17 +0100 |
| commit | ca4b4c0baa240baea0eaf372283dbd33ec671b6a (patch) | |
| tree | 0ca0ee53b1d03d76f82c3ba481da53c1e5499084 /actionpack/lib/action_controller/test_case.rb | |
| parent | 04775a41cbbddceeffa9cf8590566b9990fd4070 (diff) | |
| parent | 91a6db90cf8b2c07af4cf64a9c587268106aadd5 (diff) | |
| download | rails-ca4b4c0baa240baea0eaf372283dbd33ec671b6a.tar.gz rails-ca4b4c0baa240baea0eaf372283dbd33ec671b6a.tar.bz2 rails-ca4b4c0baa240baea0eaf372283dbd33ec671b6a.zip | |
Merge branch 'master' of github.com:lifo/docrails
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, |
