aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/testing/test_response.rb
Commit message (Collapse)AuthorAgeFilesLines
* stop applying default headers in ActionDispatch::ResponseAaron Patterson2015-09-231-1/+1
| | | | | | | | | | I'm making this change so that I can construct response objects that *don't* have the default headers applied. For example, I would like to construct a response object from the return value of a controller. If you need to construct a response object with the default headers, then please use the alternate constructor: `ActionDispatch::Response.create`
* Rack implements `redirect?` so we don't need itAaron Patterson2015-07-141-3/+0
| | | | Rack [already implements `redirect?` on the response object](https://github.com/rack/rack/blob/1569a985e17d9caaf94d0e97d95ef642c4ab14ba/lib/rack/response.rb#L141) so we don't need to implement our own.
* Revert work arounds for upstream Ruby 2.2.0 kwargs bugGenadi Samokovarov2015-03-051-1/+1
| | | | | | | | | | | | | | | | | | | The bug caused a segfault and you can find more info about it at: https://bugs.ruby-lang.org/issues/10685. We did a couple of work arounds, but 2.2.1 rolled out and those aren't needed anymore. Here are the reverted commits: - Revert "Work around for upstream Ruby bug #10685", commit 707a433870e9e06af688f85a4aedc64a90791a64. - Revert "Fix segmentation fault in ActionPack tests", commit 22e0a22d5f98e162290d9820891d8191e720ad3b. I'm also bumping the Ruby version check to 2.2.1 to prevent future segfaults.
* Work around for upstream Ruby bug #10685Genadi Samokovarov2015-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | In f6e293ec54f02f83cdb37502bea117f66f87bcae we avoided a segfault in the tests, however I think we should try to avoid the crash, as it may happen in user code as well. Here is what I distiled the bug down to: ```ruby # Rails case - works on 2.0, 2.1; crashes on 2.2 require 'action_dispatch' ActionDispatch::Response.new(200, "Content-Type" => "text/xml") # General case - works on 2.0, 2.1; crashes on 2.2 def foo(optional = {}, default_argument: nil) end foo('quux' => 'bar') ```
* Fix default headers in test responsesJeremy Kemper2015-02-251-12/+1
| | | | | | | Fixes regression in #18423. Merge default headers for new responses, but don't merge when creating a response from the last session request. hat tip @senny :heart:
* Default headers, removed in controller actions, will not be reapplied to the ↵Jonas Baumann2015-01-091-0/+7
| | | | test response.
* Don't duplicate Rack::Response functionality. [#5320 state:resolved]John Firebaugh2010-09-251-18/+4
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Cleanup deprecations in Action DispatchCarlos Antonio da Silva2010-09-061-93/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-2/+2
|
* Deprecation notice for TestResponse#redirected_toJoshua Peek2010-01-301-0/+5
|
* SessionRestoreError belongs in ADJoshua Peek2009-09-231-2/+2
|
* Functional test runner finalizes response just like the integration test ↵Joshua Peek2009-05-021-12/+6
| | | | | runner. In both runners, the @response object will now behave the same. Some functional tests will need to be updated if they are relying on preprocessed data on the response.
* Deprecate assert_redirect_to's partial hash matchingJoshua Peek2009-05-021-0/+6
|
* Start moving TestRequest and TestResponse into ActionDispatchJoshua Peek2009-04-301-0/+131