Skip to content
Browse files

Document ActionController::TestCase::Behavior::ClassMethods.process

[ci skip]
  • Loading branch information...
1 parent 9b1c077 commit 2aef9fddf8b4487a05638ea3341dfd65ceb229ef @gaurish gaurish committed Apr 20, 2014
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionpack/lib/action_controller/test_case.rb
View
12 actionpack/lib/action_controller/test_case.rb
@@ -550,6 +550,18 @@ def paramify_values(hash_or_array_or_value)
end
end
+ # Simulate a HTTP request to action with the given parameters and set/volley the response.
+ #
+ # - +action+: The controller action to call.
+ # - +http_method+: http method, defaults to +GET+
+ # - +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+.
+ #
+ # You can also simulate GET, POST, PATCH, PUT, DELETE, and HEAD requests with
+ # +post+, +patch+, +put+, +delete+, and +head+.
+ #
+ # Note that the request method is not verified. The different methods are
+ # available to make the tests more expressive.
def process(action, http_method = 'GET', *args)
check_required_ivars

0 comments on commit 2aef9fd

Please sign in to comment.
Something went wrong with that request. Please try again.