diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-02-19 19:31:35 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-02-19 19:31:35 -0700 |
commit | ad46884af567d6f8d6d8d777f372c39e81a560ba (patch) | |
tree | 9019995b1ebfd7e71bcf551ad78b290f30d9b3eb /actionpack/lib/action_dispatch | |
parent | 6219bebb4942dcb8aa55b0143b94ebe1a25e326c (diff) | |
download | rails-ad46884af567d6f8d6d8d777f372c39e81a560ba.tar.gz rails-ad46884af567d6f8d6d8d777f372c39e81a560ba.tar.bz2 rails-ad46884af567d6f8d6d8d777f372c39e81a560ba.zip |
Integration tests support the OPTIONS http method
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/integration.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/integration.rb b/actionpack/lib/action_dispatch/testing/integration.rb index 08b7ff49c2..0287e7728b 100644 --- a/actionpack/lib/action_dispatch/testing/integration.rb +++ b/actionpack/lib/action_dispatch/testing/integration.rb @@ -56,6 +56,12 @@ module ActionDispatch process :head, path, parameters, headers end + # Performs a OPTIONS request with the given parameters. See +#get+ for + # more details. + def options(path, parameters = nil, headers = nil) + process :options, path, parameters, headers + end + # Performs an XMLHttpRequest request with the given parameters, mirroring # a request from the Prototype library. # @@ -312,7 +318,7 @@ module ActionDispatch @integration_session = Integration::Session.new(app) end - %w(get post put head delete cookies assigns + %w(get post put head delete options cookies assigns xml_http_request xhr get_via_redirect post_via_redirect).each do |method| define_method(method) do |*args| reset! unless integration_session |