aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
Commit message (Collapse)AuthorAgeFilesLines
* Use AS::JSON for (de)serializing cookiesGodfrey Chan2014-08-171-0/+39
| | | | | | | | Use the Active Support JSON encoder for cookie jars using the `:json` or `:hybrid` serializer. This allows you to serialize custom Ruby objects into cookies by defining the `#as_json` hook on such objects. Fixes #16520.
* `responders` 1.x won't do it. Told you to RTFM for details!Godfrey Chan2014-08-171-0/+2
|
* The gem is called 'responders'Godfrey Chan2014-08-171-2/+2
|
* Raise a more helpful error for people who are using these extracted featuresGodfrey Chan2014-08-171-0/+30
|
* Fixed broken reference caused by 14965baGodfrey Chan2014-08-171-2/+2
|
* Merge pull request #16467 from strzalek/cookies-digest-config-option2Godfrey Chan2014-08-171-0/+50
|\ | | | | | | | | | | | | | | Cookies digest config option (pt. 2) Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/middleware/cookies.rb
| * Add config option for cookies digestŁukasz Strzałkowski2014-08-121-0/+50
| | | | | | | | | | | | You can now configure custom digest for cookies in the same way as `serializer`: config.action_dispatch.cookies_digest = 'SHA256'
* | Remove more references to respond_withJosé Valim2014-08-177-6/+0
| |
* | Move respond_with to the responders gemJosé Valim2014-08-171-737/+0
| | | | | | | | | | | | | | | | respond_with (and consequently the class-level respond_to) are being removed from Rails. Instead of moving it to a 3rd library, the functionality will be moved to responders gem (at github.com/plataformatec/responders) which already provides some responders extensions.
* | When your templates change, browser caches bust automatically.Jeremy Kemper2014-08-172-3/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New default: the template digest is automatically included in your ETags. When you call `fresh_when @post`, the digest for `posts/show.html.erb` is mixed in so future changes to the HTML will blow HTTP caches for you. This makes it easy to HTTP-cache many more of your actions. If you render a different template, you can now pass the `:template` option to include its digest instead: fresh_when @post, template: 'widgets/show' Pass `template: false` to skip the lookup. To turn this off entirely, set: config.action_controller.etag_with_template_digest = false
* | Merge pull request #16027 from tgxworld/template_assertionsYves Senn2014-08-141-0/+23
|\ \ | | | | | | Fixes to ActionController::TemplateAssertions
| * | Fix assert_template for files.Guo Xiang Tan2014-08-141-0/+23
| | | | | | | | | | | | | | | The test was not failing for `assert_template file: nil` when a file has been rendered.
* | | fewer operations on the options hashAaron Patterson2014-08-131-1/+1
| | | | | | | | | | | | | | | since we pass `as` down, then we won't have to do an insert / delete dance with the options hash
* | | UnexpectedErrors may reference exceptions that can't be dumpedAaron Patterson2014-08-131-0/+17
|/ / | | | | | | | | | | UnexpectedError exceptions wrap the original exception, and the original exception may contain a reference to something that can't be marshal dumped which will cause the process to die.
* | Merge pull request #16491 from akshay-vishnoi/doc-changesYves Senn2014-08-131-1/+1
|\ \ | | | | | | [ci skip] fix spelling of overridden
| * | [ci skip] fix spelling of overrideAkshay Vishnoi2014-08-131-1/+1
| | |
* | | AM, AP, AV, and AMo tests are already order_independent!Akira Matsuda2014-08-131-5/+0
|/ /
* | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
| |
* | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+5
| | | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
* | Revert "Merge pull request #16434 from strzalek/cookies-digest-config-option"Santiago Pastorino2014-08-081-17/+0
| | | | | | | | | | | | | | This reverts commit 705977620539e2be6548027042f33175ebdc2505, reversing changes made to dde91e9bf5ab246f0f684b40288b272f4ba9a699. IT BROKE THE BUILD!!!
* | Add config option for cookies digestŁukasz Strzałkowski2014-08-081-0/+17
|/ | | | | | You can now configure custom digest for cookies in the same way as `serializer`: config.action_dispatch.cookies_digest = \SHA256'
* Fixes to TestCaseTest.Guo Xiang Tan2014-08-081-4/+5
|
* Fix spelling.Guo Xiang Tan2014-08-071-1/+1
|
* call the routes method on enginesAaron Patterson2014-08-051-74/+37
| | | | if we access the instance, we can free up lots of codes
* a rails application should be an engine subclassAaron Patterson2014-08-051-1/+1
|
* no reason to lazily instantiate the routesAaron Patterson2014-08-051-45/+42
| | | | | especially if you're just going to add a call two lines down that populates the cache. common.
* just assign the instance variables on the testAaron Patterson2014-08-051-7/+3
|
* Regenerate sid when sbdy tries to fixate the sessionSantiago Pastorino2014-08-041-9/+8
| | | | | | Fixed broken test. Thanks Stephen Richards for reporting.
* Remove unnecessary call to #tapCarlos Antonio da Silva2014-07-311-5/+3
| | | | | This is not storying the RouteSet instance anywhere as the other examples in the file, so no need to use #tap.
* Deprecate `*_path` methods in mailers@schneems and @sgrif2014-07-301-0/+14
| | | | | | | | | | | Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead. Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR. Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead. The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`. Paired @sgrif & @schneems
* Merge pull request #16303 from rajcybage/removing_masterYves Senn2014-07-281-0/+2
|\ | | | | | | remove empty unused method
| * add comment to the empty each method for not removing it in futureRajarshi Das2014-07-261-1/+2
|/
* Improve description of tests.Guo Xiang Tan2014-07-251-4/+4
|
* Bug fix for assert_template when opening a new session.Guo Xiang Tan2014-07-251-0/+40
| | | | See https://github.com/rails/rails/pull/16234#commitcomment-7115670.
* Use PROCESS_COUNT to define the number of parallel executorsRafael Mendonça França2014-07-231-1/+1
|
* specify N=0 to prevent parallel tests (just run tests on the main process)Aaron Patterson2014-07-231-2/+6
|
* Fix AC::TemplateAssertions instance variables not resetting.Guo Xiang Tan2014-07-211-0/+58
| | | | Fixes https://github.com/rails/rails/issues/16119.
* Merge branch 'rm-remove-mocha'Rafael Mendonça França2014-07-191-0/+2
|\ | | | | | | | | Conflicts: actionpack/test/abstract_unit.rb
| * Stop requiring mocha automaticallyRafael Mendonça França2014-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | We are planning to remove mocha from our test suite because of performance problems. To make this possible we should stop require mocha on ActionSupport::TestCase. This should not affect applications since users still need to add mocha to Gemfile and this already load mocha. Added FIXME notes to place that still need mocha removal
* | Merge pull request #16098 from tgxworld/fixes_to_request_testRafael Mendonça França2014-07-181-22/+14
|\ \ | | | | | | Fixes to request method test.
| * | Remove redundant test.Guo Xiang Tan2014-07-181-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | Since we're stubbing the request, the test is actually just asserting that `@method = env['REQUEST_METHOD']`. In order to the test against the methodoverride middleware, we should test it against an actual request. However, Rack is already covering this scenario so we can remove this test.
| * | Fix duplicated test.Guo Xiang Tan2014-07-181-2/+6
| | | | | | | | | | | | | | | There is already another test covering Request#request_method. This test should cover Request#method.
| * | Update test to clearly reflect what it is testing for.Guo Xiang Tan2014-07-181-5/+7
| | |
| * | Update outdated test.Guo Xiang Tan2014-07-181-6/+3
| |/ | | | | | | | | The current test is asserting against an outdated version of Request#method where HEAD requests are treated as GET requests.
* | Add CHANGELOG for #14886Arthur Neves2014-07-181-1/+1
| | | | | | | | | | | | | | Also cleanup test a bit [related #14886] [related #14743]
* | LOCALHOST definition should match any 127.0.0.0/8 addressEarl J St Sauver2014-07-182-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The entire 127.0.0.0/8 range is assigned to the loopback address, not only 127.0.0.0/24. This patch allows ActionDispatch::Request::LOCALHOST to match any IPv4 127.0.0.0/8 loopback address. The only place that the #local? method was previously under test was in the show_expectations_test.rb file. I don't particularly like that that's implicitly where this code is under test, and I feel like I should move some of that testing code into the test/dispatch/request_test.rb file, but I wanted some feedback first. Credit goes to @sriedel for discovering the issue and adding the patch.
* | reporting is only done in one thread, so we can safely remove the lockAaron Patterson2014-07-171-1/+1
| | | | | | | | (I think)
* | pass the test reporter by referenceAaron Patterson2014-07-171-1/+4
| | | | | | | | | | | | this prevents the array from being dumped as a DRbObject so we can reduce communication with the server. the reporter should always exist on the server side, so we don't have to worry about GC
* | fix filesystem race conditionAaron Patterson2014-07-171-1/+1
| |
* | do not restart the service, just stop itAaron Patterson2014-07-171-1/+0
| |