instance method
get
Ruby on Rails 4.1.16
Since v3.0.20Signature
get(action, *args)
Simulate a GET request with the given parameters.
-
action: The controller action to call. -
parameters: The HTTP parameters that you want to pass. This may benil, a hash, or a string that is appropriately encoded (application/x-www-form-urlencodedormultipart/form-data). -
session: A hash of parameters to store in the session. This may benil. -
flash: A hash of parameters to store in the flash. This may benil.
You can also simulate POST, PATCH, PUT, DELETE, HEAD, and OPTIONS requests with post, patch, put, delete, head, and options.
Note that the request method is not verified. The different methods are available to make the tests more expressive.
Parameters
-
actionreq -
argsrest
Source
# File actionpack/lib/action_controller/test_case.rb, line 494
def get(action, *args)
process(action, "GET", *args)
end
Defined in actionpack/lib/action_controller/test_case.rb line 494
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::TestCase::Behavior