aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-07-05 14:03:57 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-07-05 14:03:57 -0700
commita7826bd8b7791284148c53eeefe35e8ab1185b31 (patch)
tree86f55052e7b779af1730d7642db6ba61ff293201 /actionpack
parentc8d6dded997b46d0e1807fe295363fc5048a33ef (diff)
parent6d0394ca28d68317d6119f28e9e07f48e6e5f50c (diff)
downloadrails-a7826bd8b7791284148c53eeefe35e8ab1185b31.tar.gz
rails-a7826bd8b7791284148c53eeefe35e8ab1185b31.tar.bz2
rails-a7826bd8b7791284148c53eeefe35e8ab1185b31.zip
Merge branch 'master' into testclean
* master: Add documentation for inheritance_column method Use ArgumentError vs. RuntimeError, which is more precise. CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that fix quoting for ActiveSupport::Duration instances Add few information on the field types Add the options method to action_controller testcase.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/test_case.rb9
-rw-r--r--actionpack/test/controller/test_case_test.rb5
2 files changed, 12 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 4e6ad179ff..49b411f34d 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -435,8 +435,13 @@ module ActionController
end
# Executes a request simulating HEAD HTTP method and set/volley the response
- def head(action, parameters = nil, session = nil, flash = nil)
- process(action, "HEAD", parameters, session, flash)
+ def head(action, *args)
+ process(action, "HEAD", *args)
+ end
+
+ # Executes a request simulating OPTIONS HTTP method and set/volley the response
+ def options(action, *args)
+ process(action, "OPTIONS", *args)
end
def xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb
index 6fccfea0d0..8990fc34d6 100644
--- a/actionpack/test/controller/test_case_test.rb
+++ b/actionpack/test/controller/test_case_test.rb
@@ -197,6 +197,11 @@ XML
assert_raise(NoMethodError) { head :test_params, "document body", :id => 10 }
end
+ def test_options
+ options :test_params
+ assert_equal 200, @response.status
+ end
+
def test_process_without_flash
process :set_flash
assert_equal '><', flash['test']