aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract_unit.rb
Commit message (Collapse)AuthorAgeFilesLines
* let drb make temprary serverNobuyoshi Nakada2017-12-291-8/+1
|
* Generate tmpname on its ownyuuji.yaginuma2017-12-151-1/+6
| | | | | | | `make_tmpname` was removed by https://github.com/ruby/ruby/commit/25d56ea7b7b52dc81af30c92a9a0e2d2dab6ff27. In this case, we want a file name, not a `File`. So cannot use `Tempfile`. Fixes #31458
* Add headless firefox driver to System Testsbogdanvlviv2017-12-071-0/+4
|
* removed unnecessary semicolonsShuhei Kitagawa2017-10-281-1/+1
|
* Add headless chrome driver to System Testsyuuji.yaginuma2017-10-171-0/+4
|
* [Action Pack] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Prepare AP and AR to be frozen string friendlyKir Shatrov2017-07-061-1/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Define path with __dir__bogdanvlviv2017-05-231-5/+5
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Call system test driver per-instance rather than globallyeileencodes2017-03-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | Previously the system test subclasses would call `driven_by` when the app booted and not again when the test was initialized which resulted in the driver from whichever class was called last to be used in tests. In rails/rails#28144 the `driven_by` method was changed to run `use` on setup and `reset` on teardown. While this was a viable fix this really pointed to the problem that system test `driven_by` was a global setting, rather than a per-class setting. To alieviate this problem calling the driver should be done on an instance level, rather than on the global level. I added an `initialize` method to `SystemTestCase` which will call `use` on the superclass driver. Running the server has been moved to `start_application` so that it only needs to be called once on boot and no options from `driven_by` were being passed to it. This required a largish rewrite of the tests. Each test needs to utilize the subclass so that it can properly test the drivers. `ActionDispatch::SystemTestCase` shouldn't be called directly anymore.
* Don't pollute Object with rubinius_skip and jruby_skipAkira Matsuda2017-01-171-9/+9
| | | | we call them only in the tests
* Use Encoding::UTF_8 constant for default_{internal,external} in the testsAkira Matsuda2017-01-111-2/+2
|
* Fix style guide violationsRafael Mendonça França2017-01-051-3/+3
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-1/+1
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
* 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
| |