diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-04 11:15:40 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-05-04 11:16:34 -0300 |
commit | 9b2b36fadbe05c395d6d8f51c247e51cb8766d0f (patch) | |
tree | fed4f86303cc911afd1799765dffef704c460bfb /actionpack/lib | |
parent | 356156543cb2f52fa93e8aeb932a1b06353b09f8 (diff) | |
download | rails-9b2b36fadbe05c395d6d8f51c247e51cb8766d0f.tar.gz rails-9b2b36fadbe05c395d6d8f51c247e51cb8766d0f.tar.bz2 rails-9b2b36fadbe05c395d6d8f51c247e51cb8766d0f.zip |
Fix examples indent and improve #process docs a bit [ci skip]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index e958cfecdf..c6a8f581de 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -554,27 +554,25 @@ module ActionController # parameters and set/volley the response. # # - +action+: The controller action to call. - # - +http_method+: request method used to send http request. - # possible values GET, POST, HEAD, PUT, DELETE, PATCH. defaults to GET. - # - +parameters+: The HTTP parameters. - # This may be +nil+, a hash, or a string that is appropriately encoded - # (+application/x-www-form-urlencoded+ or +multipart/form-data+). - # - +session+: A hash of parameters to store in the session. - # This may be +nil+. - # - +flash+: A hash of parameters to store in the flash. - # This may be +nil+. + # - +http_method+: Request method used to send the http request. Possible values + # are +GET+, +POST+, +PATCH+, +PUT+, +DELETE+, +HEAD+. Defaults to +GET+. + # - +parameters+: The HTTP parameters. This may be +nil+, a hash, or a + # string that is appropriately encoded (+application/x-www-form-urlencoded+ + # or +multipart/form-data+). + # - +session+: A hash of parameters to store in the session. This may be +nil+. + # - +flash+: A hash of parameters to store in the flash. This may be +nil+. # - # example: calling +create+ action & sending two params + # Example calling +create+ action and sending two params: # - # process :create, 'POST', user: { name: 'Gaurish Sharma', email: 'user@example.com' } + # process :create, 'POST', user: { name: 'Gaurish Sharma', email: 'user@example.com' } # - # another example with parameters, +nil+ session & flash message + # Example sending parameters, +nil+ session and setting a flash message: # - # process :view, 'GET', { id: 7 }, nil, { message: 'This is flash message' } + # process :view, 'GET', { id: 7 }, nil, { notice: 'This is flash message' } # - # To simulate +GET+, +POST+, +PATCH+, +PUT+, - # +DELETE+ and +HEAD+ requests prefer using #get, #post, #patch, #put, - # #delete and #head respectively which will make tests more expressive. + # To simulate +GET+, +POST+, +PATCH+, +PUT+, +DELETE+ and +HEAD+ requests + # prefer using #get, #post, #patch, #put, #delete and #head methods + # respectively which will make tests more expressive. # # Note that the request method is not verified. def process(action, http_method = 'GET', *args) |