aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add three new rubocop rulesRafael Mendonça França2016-08-161-4/+4
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Allow specifying encoding of parameters by actionKerri Miller2016-08-091-13/+5
| | | | | At GitHub we need to handle parameter encodings that are not UTF-8. This patch allows us to specify encodings per parameter per action.
* code gardening: removes redundant selfsXavier Noria2016-08-081-1/+1
| | | | | | | | | A few have been left for aesthetic reasons, but have made a pass and removed most of them. Note that if the method `foo` returns an array, `foo << 1` is a regular push, nothing to do with assignments, so no self required.
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-1/+0
|
* applies remaining conventions across the projectXavier Noria2016-08-061-5/+5
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-19/+19
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-38/+38
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix GET JSON integration test request to use method overrideeileencodes2016-08-051-0/+1
| | | | | | | | | | | | | | | | | | When a `GET` request is sent `as: :json` in an integration test the test should use Rack's method override to change to a post request so the paramters are included in the postdata. Otherwise it will not encode the parameters correctly for the integration test. Because integration test sets up it's own middleware, `Rack::MethodOverride` needs to be included in the integration tests as well. `headers ||= {}` was moved so that headers are never nil. They should default to a hash. Fixes #26033 [Eileen M. Uchitelle & Aaron Patterson]
* Remove unused activerecord requirement in actionpack.Jun Aruga2016-07-111-1/+0
|
* More Action Pack `abstract_unit` cleanup (#25211)Jon Moss2016-05-311-27/+0
| | | | | - Remove dead classes / dead code - Move class definitions to where they are used, don't define in a shared space
* Move `Workshop` class definitionJon Moss2016-05-301-18/+0
| | | | | We should define it only where we need it, not in the global abstract unit :grimacing:
* Merge pull request #23932 from arthurnn/arthurnn/remove_load_pathsArthur Nogueira Neves2016-03-011-2/+0
|\ | | | | Remove load_paths file
| * Remove load_paths fileArthur Neves2016-02-271-2/+0
| |
* | Deprecate :controller and :action path parametersAndrew White2016-03-011-2/+6
|/ | | | | | | | Allowing :controller and :action values to be specified via the path in config/routes.rb has been an underlying cause of a number of issues in Rails that have resulted in security releases. In light of this it's better that controllers and actions are explicitly whitelisted rather than trying to blacklist or sanitize 'bad' values.
* do not run in parallel on travisAaron Patterson2016-01-121-1/+5
|
* Test ActionController::Renderers::use_renderersBenjamin Fleischer2015-12-311-0/+6
|
* mostly remove the ParamsParser middlewareAaron Patterson2015-09-181-1/+0
| | | | | This can still be added to the middleware stack, but is really not necessary. I'll follow up with a commit that deprecates the constant
* Remove mocha from ActionPack testsMarcin Olichwirowicz2015-09-051-1/+0
|
* provide a request and response to all controllersAaron Patterson2015-08-251-2/+6
| | | | | | | | | | Controllers should always have a request and response when responding. Since we make this The Rule(tm), then controllers don't need to be somewhere in limbo between "asking a response object for a rack response" or "I, myself contain a rack response". This duality leads to conditionals spread through the codebase that we can delete: * https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
* adding a direct dispatch method to controller classesAaron Patterson2015-08-251-8/+2
| | | | This saves a lambda and request allocation on each request.
* Merge pull request #21368 from rodzyn/remove_mochaKasper Timm Hansen2015-08-251-1/+7
|\ | | | | Get rid of mocha tests in actionpack - part 2
| * Get rid of mocha tests - part 2Marcin Olichwirowicz2015-08-251-1/+7
| |
* | Merge pull request #21345 from aditya-kapoor/trim-apRafael Mendonça França2015-08-251-2/+0
|\ \ | | | | | | Trim out least needed controllers from AP test suite
| * | Trim out unneeded controllers from AP test suiteAditya Kapoor2015-08-241-2/+0
| | |
* | | remove dead code :bomb:Aaron Patterson2015-08-241-2/+0
| | |
* | | subclass and delegate rather than mutating existing objectsAaron Patterson2015-08-241-12/+29
| | | | | | | | | | | | | | | If we subclass and augment the superclass, then we don't need to have setters for particular things on the superclass.
* | | temp files are no more requireGaurav Sharma2015-08-251-1/+0
| | | | | | | | | `:nail_care:`
* | | use a custom request class to determine the controller classAaron Patterson2015-08-241-23/+21
| |/ |/| | | | | | | | | controller class resolution has been moved to the request object, so we should override that method instead of relying on the RouteSet to generate the controller class.
* | Merge pull request #21321 from rodzyn/removing_mochaKasper Timm Hansen2015-08-241-0/+1
|\ \ | |/ |/| Get rid of mocha tests in actionpack - part 1
| * Get rid of mocha tests - part 1Marcin Olichwirowicz2015-08-241-0/+1
| |
* | Refactor to remove controller class from route to requesteileencodes2015-08-221-1/+1
|/ | | | | | | | | | This refactoring moves the controller class name that was on the route set to the request. The purpose of this refactoring is for changes we need to move controller tests to integration tests, mainly being able to access the controller on the request instead of having to go through the router. [Eileen M. Uchitelle & Aaron Patterson]
* Merge pull request #11352 from xaviershay/dispatcher-apiRafael Mendonça França2015-08-081-8/+4
|\ | | | | Allow a custom dispatcher to be provided to routing.
| * Allow a custom dispatcher to be provided to routing.Xavier Shay2015-08-071-8/+4
| |
* | Refactor to remove DrawOnce moduleeileencodes2015-08-081-27/+8
|/ | | | | | We were doing extra work that could be pushed off to Integration test and SharedRoutes. Creating an extra module isn't necessary when those are created by their respective classes.
* Using strings or symbols for middleware class names is deprecated.Aaron Patterson2015-08-071-7/+7
| | | | | | | | | | Convert things like this: middleware.use "Foo::Bar" to this: middleware.use Foo::Bar
* Add ActionController API functionalitySantiago Pastorino2015-06-111-0/+4
|
* Deprecate `:nothing` option for render methodMehmet Emin İNAÇ2015-05-281-1/+1
| | | | `head` method works similar to `render` method with `:nothing` option
* wrap "require 'drb/unix'" by bgin-end at test/abstract_unit.rbToshi MARUYAMA2015-04-091-1/+5
| | | | | | Related: #19617, #19187, #19533, #19689, #19675. 'drb/unix' does not exist on mingw.
* Revert "Merge pull request #19404 from dmathieu/remove_rack_env"Jeremy Kemper2015-03-201-1/+1
| | | | | | | Preserving RACK_ENV behavior. This reverts commit 7bdc7635b885e473f6a577264fd8efad1c02174f, reversing changes made to 45786be516e13d55a1fca9a4abaddd5781209103.
* don't fallback to RACK_ENV when RAILS_ENV is not presentDamien Mathieu2015-03-191-1/+1
|
* Run ActionPack test cases in random order.Guo Xiang Tan2015-03-061-5/+0
|
* Avoid parallelizing Action Pack's tests on RubiniusRobin Dupret2015-03-021-2/+2
| | | | | | | | | | Since the `ForkingExecutor` class seems to be pretty slow on Rubinius due to DRb (c.f. http://git.io/xIVg), let's avoid running tests with it on this platform. Also, the `parallelize_me!` call make the suite to output a bunch of errors due to rubinius/rubinius#2934 since there are thread-safety problems with autoloading.
* Removing old helper that was necessary for compatibility with Ruby 1.8.xThiago Pradi2015-02-221-13/+0
|
* Removing unused constants from abstract_unitThiago Pradi2015-02-221-2/+0
|
* Removing unused controller from abstract_unitThiago Pradi2015-02-221-16/+0
|
* Merge pull request #17862 from lucasmazza/lm-hide-actionRafael Mendonça França2014-12-021-1/+2
| | | | `_generate_paths_by_default` should always be private.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Remove session to allow `with_routing` to be called twice.Guo Xiang Tan2014-11-051-0/+1
| | | | Fixes: https://github.com/rails/rails/issues/16814
* Default to sorting user's test cases for nowGodfrey Chan2014-09-081-1/+1
| | | | | | | | | | | Goals: 1. Default to :random for newly generated applications 2. Default to :sorted for existing applications with a warning 3. Only show the warning once 4. Only show the warning if the app actually uses AS::TestCase Fixes #16769