aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* Renamed _path_segments to _recallBogdan Gusiev2012-08-041-1/+1
|
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* Controller actions are processed in a separate thread for liveAaron Patterson2012-07-291-2/+10
| | | | | | | | | | responses. Processing controller actions in a separate thread allows us to work around the rack api - we can allow the user to set status and headers, then block until the first bytes are written. As soon as the first bytes are written, the main thread can return the status, headers, and (essentially) a queue for the body.
* initialize ivars, refactor recycle! to call initializeAaron Patterson2012-07-291-9/+1
|
* issue a warning when we cannot construct a controllerAaron Patterson2012-07-281-2/+10
|
* threads can wait on responses to be committedAaron Patterson2012-07-271-0/+1
|
* deprecate `describe` without a block.Aaron Patterson2012-07-091-1/+1
| | | | | minitest/spec provides `describe`, so deprecate the rails version and have people use the superclass version
* Revert "push parameter instantiation to one method"Aaron Patterson2012-07-051-1/+1
| | | | | | | This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e. This breaks Sam Ruby's tests for some reason. Revert until we figure it out.
* Merge branch 'master' into testcleanAaron Patterson2012-07-051-2/+7
|\ | | | | | | | | | | | | | | | | | | * 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.
| * Add the options method to action_controller testcase.François de Metz2012-07-041-2/+7
| | | | | | | | Signed-off-by: François de Metz <francois@stormz.me>
* | push parameter instantiation to one methodAaron Patterson2012-07-031-1/+1
| |
* | add Mime.fetch so we can have default mime typesAaron Patterson2012-07-031-2/+1
| |
* | make the default environment have actual defaultsAaron Patterson2012-07-031-2/+9
| | | | | | | | | | | | instead of deleting keys on every instantiation, create defaults we actually use. eventually we can pass an environment in to the request, and create a new req / res object on each call.
* | assing the request on the response only onceAaron Patterson2012-07-031-4/+5
| |
* | group things that are alikeAaron Patterson2012-07-031-10/+7
| |
* | push functional test specific methods to it's own moduleAaron Patterson2012-07-031-1/+5
| |
* | test should be testing to_param not to_s, remove Array subclassAaron Patterson2012-07-031-5/+1
| |
* | push the cookie writing stuff out of the controllerAaron Patterson2012-07-031-0/+6
| | | | | | | | merging cookies is responsibility of the test runner
* | extend the controller with special logic on recycleAaron Patterson2012-07-031-6/+3
| | | | | | | | | | | | For some reason, this special logic is only supposed to be executed on the second request. For now, we'll extend on recycle, but we should figure out why this functionality can't be run on every request
* | push req / res setting to the test runnerAaron Patterson2012-07-031-1/+10
|/ | | | | Try to avoid making the controller mutate itself so that we can eventually make the response async
* Merge pull request #6805 from tim-vandecasteele/uploadedfile-paramifyCarlos Antonio da Silva2012-06-231-1/+1
|\ | | | | Don't paramify ActionDispatch::Http::UploadedFile in tests
| * Don't paramify ActionDispatch::Http::UploadedFile in testsTim Vandecasteele2012-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | To test uploading a file without using fixture_file_upload, a posted ActionDispatch::Http::UploadedFile should not be paramified (just like Rack::Test::UploadedFile). (Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't share the same API, tempfile is not accessible on Rack::Test::UploadedFile as discussed in https://github.com/brynary/rack-test/issues/30)
* | add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
|/
* Fix incorrect assert_block -> assert conversion. Assumed too much from the ↵Jeremy Kemper2012-05-171-2/+2
| | | | MiniTest deprecation message.
* MiniTest deprecated #assert_block in favor of calling #assert with a blockJeremy Kemper2012-05-171-1/+1
|
* Removing ==Examples and last blank lines of docs from actionpackFrancesco Rodriguez2012-05-151-6/+1
|
* Improve assert_template layout checkingAlexey Vakhov2012-05-041-3/+15
|
* Fix assert_template :layout => nil assertionAlexey Vakhov2012-05-041-2/+5
|
* Fix assert_template assertion with :layout optionAlexey Vakhov2012-05-041-1/+1
|
* Merge pull request #6034 from ↵Piotr Sarnacki2012-04-301-1/+0
|\ | | | | | | | | willbryant/flash_must_not_load_session_on_every_request_master Fix the Flash middleware loading the session on every request
| * fix the Flash middleware loading the session on every request (very ↵Will Bryant2012-04-281-1/+0
| | | | | | | | dangerous especially with Rack::Cache), it should only be loaded when the flash method is called
* | Fix controller_class_name for anonymous controllers.Michael Schuerig2012-04-291-1/+1
| |
* | Don't convert params if the request isn't HTML - fixes #5341Andrew White2012-04-291-6/+18
| |
* | Merge session arg with existing session instead of overwritingAndrew White2012-04-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | This may break existing tests that are asserting the whole session contents but should not break existing tests that are asserting individual keys - e.g: class SomeControllerTest < ActionController::TestCase setup do session['user_id'] = 1 end test "some test" do get :some_action, nil, { 'another_var' => 2 } # This assertion will now fail assert_equal({ 'another_var' => 2 }, session) # This assertion will still pass assert_equal 2, session['another_var] end end Fixes #1529.
* remove unnecessary else statementVasiliy Ermolovich2012-04-261-3/+3
|
* Remove obsolete codeAlexey Vakhov2012-04-121-3/+0
|
* We dont need to merge in the parameters as thats all being reset by the rack ↵David Heinemeier Hansson2012-03-201-1/+0
| | | | headers (and its causing problems for Strong Parameters attempt of wrapping request.parameters because it will change in testing)
* Remove ActionController::TestCase#rescue_action_in_public!Piotr Sarnacki2012-03-151-5/+0
| | | | | | This method has no effect since exception handling was moved to middlewares and ActionController tests do not use any middlewares.
* assert_template matches against RegexpGrant Hutchins2012-03-101-2/+7
| | | | | | | | | | | | | | | This allows for more strict template assertions, while maintaining backward compatibility. For example, if you use assert_template("foo/bar") and "foo/bar/baz" was rendered, the test passes. But if you use assert_template(%r{\Afoo/bar\Z}), you will catch that a different template was rendered. Also, if you passed an unsupported argument to assert_template() in the past, it would silently succeed. Now it raises an ArgumentError.
* force response body to be read in assert_templateSergey Nartimov2012-03-051-0/+4
|
* Add config.default_method_for_update to support PATCHDavid Lee2012-02-221-1/+6
| | | | | | | | | | | | | | | | PATCH is the correct HTML verb to map to the #update action. The semantics for PATCH allows for partial updates, whereas PUT requires a complete replacement. Changes: * adds config.default_method_for_update you can set to :patch * optionally use PATCH instead of PUT in resource routes and forms * adds the #patch verb to routes to detect PATCH requests * adds #patch? to Request * changes documentation and comments to indicate support for PATCH This change maintains complete backwards compatibility by keeping :put as the default for config.default_method_for_update.
* Dont do underscore and camelize, only camelize is fineSemyon Perepelitsa2012-01-311-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-01-111-0/+1
|\
| * Add missing endRafael Mendonça França2012-01-101-0/+1
| |
* | AC:TestCase::Behavior#head only accepts parameters as second argumentRafael Mendonça França2012-01-101-1/+1
| |
* | Fix ActionController::TestCase::Behavior.headRafael Mendonça França2012-01-101-1/+1
| |
* | Merge pull request #4371 from rafaelfranca/test_unit_cleanupAaron Patterson2012-01-091-1/+1
|\ \ | | | | | | Test unit cleanup
| * | Whitespaces :scissors:Rafael Mendonça França2012-01-061-1/+1
| | |
* | | get rid of using instance_variable_names method from ASSergey Nartimov2012-01-071-2/+2
|/ / | | | | | | | | - instance_variables return symbols in 1.9 - there is instance_variable_defined? method