aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/test_case_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Prefer render template: in testsJohn Hawthorn2019-03-211-2/+2
| | | | | | | | | | | | Many tests were using `render file:`, but were only testing the behaviour of `render template:` (file: just allows more paths/ is less secure then template:). The reason for so many `render file:` is probably that they were the old default. This commit replaces `render file:` with `render template:` anywhere the test wasn't specifically interested in using `render file:`.
* Always call superAaron Patterson2019-02-081-0/+1
|
* Split digest cache from details identity cacheAaron Patterson2019-02-081-0/+4
| | | | | This commit splits the digest cache from the "details identity" cache. Now both caches can be managed independently.
* Tighten up the AV::Base constructorAaron Patterson2019-01-291-1/+1
| | | | | | | | | | | | | | | 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.
* Change the empty block style to have space inside of the blockRafael Mendonça França2018-09-251-1/+1
|
* Remove deprecated catch-all route in the AV testsAaron Patterson2018-09-241-2/+10
| | | | | | | | 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
* Replace `assert !` with `assert_not`Daniel Colson2018-04-191-1/+1
| | | | | This autocorrects the violations after adding a custom cop in 3305c78dcd.
* Fix testing helpers that use Action View's capturing helpers (e.g. content_for)George Claghorn2017-07-251-0/+8
|
* 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
|
* "Use assert_nil if expecting nil. This will fail in minitest 6."Akira Matsuda2016-12-251-1/+1
|
* Remove deprecated support to :text in renderRafael Mendonça França2016-10-101-1/+1
|
* improve error message when include assertions failMichael Grosser2016-09-161-7/+7
| | | | | | assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
* 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.
* 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.
* applies remaining conventions across the projectXavier Noria2016-08-061-3/+0
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-20/+20
|
* applies new string literal convention in actionview/testXavier Noria2016-08-061-46/+46
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* TestController#parameters returns AC::ParametersJustin Coyne2015-12-291-0/+4
| | | | | | | Fixes #22827 ActionView::TestCase::TestController#parameters should return an instance of ActionController::Parameters rather than a hash. This enables helper methods to use the correct interface.
* Removed Mocha from ActionView part 1Ronak Jangir2015-08-241-10/+13
|
* Fix test assign_parameter method signatureeileencodes2015-08-151-1/+1
| | | | | | | | Oops, I broke the build :( Fixes the method signature of `assign_parameters` which now takes 6 arguments instead of 4. We likely will end up chaning the method signature further so good to know this test is here.
* Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-301-58/+0
|
* Error message testing fixFranky W2015-02-201-1/+2
| | | | | | | | | The testing of error messages have been implemented wrongly a few times. This is an attempt to fix it. For example, some of these test should have failed with the new code. The reason they are not failling with the new string is the fact they were not being tested beforehand.
* Change `gsub` to `tr` where possibleAlexander Balashov2014-10-061-1/+1
|
* Do not memoize document_root_element in view testsRafael Mendonça França2014-09-081-0/+11
| | | | | | | Memoizing will not make possible to assert the output of the view if it is changed after the first assert_select call Related with plataformatec/simple_form#1130 and rails/rails-dom-testing#15
* subclass Rails::EngineAaron Patterson2014-07-161-1/+2
|
* Remove unneeded filesPiotr Sarnacki2013-06-201-1/+0
|
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-0/+367