aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/abstract_unit.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "MethodCallAssertions is a regular player of the team ↵Rafael Mendonça França2019-08-021-0/+3
| | | | | | ActiveSupport::TestCase now" This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
* Revert "You give jruby_skip & rubinius_skip a good name"Rafael Mendonça França2019-08-021-0/+11
| | | | This reverts commit 8d2866bb80fbe81acb04f5b0c44f152f571fb29f.
* You give jruby_skip & rubinius_skip a good nameAkira Matsuda2019-08-021-11/+0
| | | | | | | | This hack prevails everywhere in the codebase by being copy & pasted, and it's actually not a negative thing but a necessary thing for framework implementors, so it should better have a name and be a thing. And with this commit, activesupport/test/abstract_unit.rb now doesn't silently autoload AS::TestCase, so we're ready to establish clearner environment for running AS tests (probably in later commits)
* MethodCallAssertions is a regular player of the team ActiveSupport::TestCase nowAkira Matsuda2019-08-021-3/+0
| | | | It's used everywhere, clean and mature enough
* Run actionview tests in parallelJohn Hawthorn2019-06-051-0/+2
|
* Output junit format test reportFumiaki MATSUSHIMA2019-04-041-0/+2
|
* Pass locals in to the template object on constructionAaron Patterson2019-02-251-1/+1
| | | | | | | This commit ensures that locals are passed in to the template objects when they are constructed, then removes the `locals=` mutator on the template object. This means we don't need to mutate Template objects with locals in the `decorate` method.
* Always pass a format to the ActionView::Template constructorAaron Patterson2019-02-251-1/+1
| | | | | This means we can eliminate nil checks and remove some mutations from the `decorate` method.
* Move templates to an anonymous subclass of AV::BaseAaron Patterson2019-02-061-2/+4
| | | | | Now we can throw away the subclass and the generated methods will get GC'd too
* Pass source to template handler and deprecate old style handlerAaron Patterson2019-02-011-1/+1
| | | | | | | | | This commit passes the mutated source to the template handler as a parameter and deprecates the old handlers. Old handlers required that templates contain a reference to mutated source code, but we would like to make template objects "read only". This change lets the template remain "read only" while still giving template handlers access to the source code after mutations.
* Tighten up the AV::Base constructorAaron Patterson2019-01-291-2/+2
| | | | | | | | | | | | | | | The AV::Base constructor was too complicated, and this commit tightens up the parameters it will take. At runtime, AV::Base is most commonly constructed here: https://github.com/rails/rails/blob/94d54fa4ab641a0ddeb173409cb41cc5becc02a9/actionview/lib/action_view/rendering.rb#L72-L74 This provides an AV::Renderer instance, a hash of assignments, and a controller instance. Since this is the common case for construction, we should remove logic from the constructor that handles other cases. This commit introduces special constructors for those other cases. Interestingly, most code paths that construct AV::Base "strangely" are tests.
* Always evaluate views against an ActionView::BaseAaron Patterson2019-01-161-1/+1
| | | | | Methods created by views should always be evaluated against an AV::Base instance. This way we can extract and refactor things in to classes.
* Fix more offencesRafael Mendonça França2018-09-251-1/+1
|
* Merge pull request #33973 from rails/remove-catch-allAaron Patterson2018-09-251-56/+23
|\ | | | | Remove deprecated catch-all route in the AV tests
| * make bot happyAaron Patterson2018-09-241-1/+1
| |
| * Remove deprecated catch-all route in the AV testsAaron Patterson2018-09-241-56/+23
| | | | | | | | | | | | | | | | This commit removes a deprecated catch-all route in the AV tests. It defines and includes the necessary routes for each test such that we don't need the catch-all anymore. This also helps push us toward #33970
* | Remove private defSakshi Jain2018-09-231-8/+10
|/
* Include `ActionDispatch::DrawOnce` in `ActiveSupport::TestCase`Ryuta Kamizono2017-09-271-1/+1
| | | | It is also used in `BlockTestCase`.
* Remove unused code that was copied from actionpackRyuta Kamizono2017-09-271-52/+1
| | | | | `abstract_unit.rb` in actionview was copied from actionpack in the commit eb23754e. But some part is never used for actionview's tests.
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+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-7/+7
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* 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
|
* Privatize unneededly protected methods in Action View testsAkira Matsuda2016-12-231-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-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-10/+10
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-1/+1
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionview/testXavier Noria2016-08-061-23/+23
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Silence deprecation message for dynamic controller and actions on ↵Mehmet Emin İNAÇ2016-03-071-6/+8
| | | | action_view test cases
* Remove load_paths fileArthur Neves2016-02-271-2/+0
|
* Removed Mocha from Action ViewRonak Jangir2015-09-231-1/+0
|
* 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
* Removed Mocha from ActionView part 1Ronak Jangir2015-08-241-0/+4
|
* Fix deprecation warning in testseileencodes2015-08-081-7/+7
| | | | | | | | | | | | | Using the string version of the class reference is now deprecated when referencing middleware. This should be written as a class not as a string. Deprecation warning that this change fixes: ``` DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change them to actual class references. For example: "ActionDispatch::ShowExceptions" => ActionDispatch::ShowExceptions ```
* 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
|
* Cleaning unused methods from abstract_unitThiago Pradi2015-03-141-57/+0
|
* Revert "Leave all our tests as order_dependent! for now"Matthew Draper2015-03-061-5/+0
| | | | | | | | | | | | This reverts commit 2f52f969885b2834198de0045748436a4651a94e. Conflicts: actionmailer/test/abstract_unit.rb actionview/test/abstract_unit.rb activemodel/test/cases/helper.rb activerecord/test/cases/helper.rb activesupport/test/abstract_unit.rb railties/test/abstract_unit.rb
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Don’t require already required modulesclaudiofullscreen2014-09-261-2/+0
| | | | | | | | | abstract_unit.rb requires `action_controller` which [already includes the following lines of code](https://github.com/rails/rails/blob/64fcdce1d3a6a8768ab17f3be144270456814f82/actionpack/lib/action_controller.rb#L2L3): ```ruby require 'abstract_controller' require 'action_dispatch' ```
* 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
* Leave all our tests as order_dependent! for nowMatthew Draper2014-09-021-0/+5
| | | | | | | | | We're seeing too many failures to believe otherwise. This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57, cbde413df3839e06dd14e3c220e9800af91e83ab, bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and 2440933fe2c27b27bcafcd9019717800db2641aa.
* 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.