aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/fixtures
Commit message (Collapse)AuthorAgeFilesLines
* Respect value of `:object` if `:object` is false when renderingyui-knk2015-11-131-0/+1
| | | | | This commit fixes the bug convering `false` to `locals[as]` when `options[:object]` is `false` (close #22260).
* Tweaked wording used in some tests.Sebastian McKenzie2015-10-251-1/+1
|
* Fix calling cache helper with a relationLachlan Sylvester2015-08-281-0/+4
|
* Add wildcard template dependencies.Kasper Timm Hansen2015-07-262-0/+1
|
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-171-0/+1
| | | | | | | | | This will silence deprecation warnings. Most of the test can be changed from `render :text` to render `:plain` or `render :body` right away. However, there are some tests that needed to be fixed by hand as they actually assert the default Content-Type returned from `render :body`.
* Remove `assigns` and `assert_template`.Guo Xiang Tan2015-05-302-1/+2
|
* Do not put partial name to local_assigns when rendering without an objectHenrik Nygren2015-05-141-0/+1
| | | | | | | | When one rendered a partial template without specifying an object or a collection (e.g. <%= render partial: 'partial_name' %>), Rails would make an object called :partial_name available in local_assigns. I don't think this was the intended behavior, since no local variable called 'partial_name' gets defined in the view.
* Deleting unused fixturesThiago Pradi2015-03-142-10/+0
|
* fix ActionView::Template::Error when using Streaming with capture.yuuji.yaginuma2015-03-011-0/+6
| | | | can't acquire a encoding from StreamingBuffer. fixes #12001
* Collections automatically cache and fetch partials.Kasper Timm Hansen2015-02-212-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Collections can take advantage of `multi_read` if they render one template and their partials begin with a cache call. The cache call must correspond to either what the collections elements are rendered as, or match the inferred name of the partial. So with a notifications/_notification.html.erb template like: ```ruby <% cache notification %> <%# ... %> <% end %> ``` A collection would be able to use `multi_read` if rendered like: ```ruby <%= render @notifications %> <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %> ```
* Partial template name does no more have to be a valid Ruby identifierAkira Matsuda2015-02-062-0/+1
| | | | because the partial renderer would not create an lvar per each template since c67005f221f102fe2caca231027d9b11cf630484
* Make possible to use blocks with short version of render partialNikolay Shebanov2014-12-191-0/+3
|
* Merge pull request #17878 from claudiob/remove-unused-modgreet-fixtureYves Senn2014-12-021-1/+0
|\ | | | | Remove unused AV/test/fixtures/scope
| * Remove unused AV/test/fixtures/scopeclaudiob2014-12-011-1/+0
| | | | | | | | | | The file `modgreet.erb` was added 8 years ago in 21187c0 and is not used anymore by any test.
* | Remove unused AV/test/fixtures/happy_pathclaudiob2014-12-011-1/+0
|/ | | | | | | | | | The `test/fixtures/happy_path/render_action/hello_world.erb` file was introduced in 8ab37c7 for the `TestRenderAction` test. That test was subsequently removed in 34f058e, so the fixture is not used anymore. If Travis CI is happy, then you can be sure the fixture can be removed.
* Merge pull request #17871 from claudiob/remove-unused-blog-public-fixturesSantiago Pastorino2014-12-024-4/+0
|\ | | | | Remove unused AV/test/fixtures/blog_public
| * Remove unused AV/test/fixtures/blog_publicclaudiob2014-12-014-4/+0
| | | | | | | | | | | | | | | | The fixtures were added to support StaticTests in 401cd97 but those tests were then removed in d5ad92ce. If Travis CI is happy with this PR, then you can be sure that those fixtures are not needed anymore.
* | Remove one AV fixture (duplicate of an AP fixture)claudiob2014-12-011-3/+0
|/ | | | | | | | | | | | Both ActionPack and ActionView include `test/fixtures/functional_caching/fragment_cached_without_digest.html.erb`. The [ActionPack file](https://github.com/rails/rails/blob/master/actionpack/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb) is used by the tests. The [ActionView file](https://github.com/rails/rails/blob/master/actionview/test/fixtures/functional_caching/fragment_cached_without_digest.html.erb) is not: it was introduced in eb23754e when some tests and fixtures were moved from AP to AV, but no tests in AV uses the fixture. Long story short: if Travis CI is happy with removing the fixture, you can be sure that is not needed anymore!
* Some valid block calls in templates caused syntax errorsAkira Matsuda2014-11-201-1/+1
| | | | Now ActionView accepts <%= foo(){ %> and <%= foo()do %> :golf:
* handle <%== nil %> casesAaron Patterson2014-09-141-0/+1
| | | | | This is much less common than string literal appends, so add a special case method for it. Maybe fixes bug reported by @jeremy on 97ef636191933f1d4abc92fc10871e6d1195285c
* Added PartialIteration class used when rendering collectionsJoel Junström2014-07-162-0/+2
| | | | | | | | | | | | The iteration object is available as the local variable "template_name_iteration" when rendering partials with collections. It gives access to the +size+ of the collection beeing iterated over, the current +index+ and two convinicence methods +first?+ and +last?+ "template_name_counter" variable is kept but is deprecated. [Joel Junström + Lucas Uyezu]
* Ensure LookupContext in Digestor selects correct variantPiotr Chmolowski2014-03-092-0/+2
| | | | | | | | | | Related to: #14242 #14243 14293 Variants passed to LookupContext#find() seem to be ignored, so I've used the setter instead: `finder.variants = [ variant ]`. I've also added some more test cases for variants. Hopefully this time passing tests will mean it actually works.
* Variants in ActionView::DigestorPiotr Chmolowski2014-03-041-0/+15
| | | | | | | | | | | Take variants into account when calculating template digests in ActionView::Digest. Digestor#digest now takes a hash as an argument to support variants and allow more flexibility in the future. Old-style arguments have been deprecated. Fixes #14242
* Added tests to render helper that expect `render partial: @foo` toIain Beeston2014-02-121-0/+1
| | | | | | | | | | automatically call @foo.to_partial_path Calling `render @foo` allows local variables but not options to be passed to the partial renderer. The correct way to render an object AND pass options to the partial renderer is to pass the object in the `:partial` parameter. However, there were previously no tests for this behaviour (in `render_helper_test.rb` at least).
* Unused classes in AV testsAkira Matsuda2013-12-241-4/+0
|
* Remove unused AV helper fixtures from e10a2531claudiob2013-09-144-16/+0
| | | | | Several fixtures for helpers are removed. They were introduced in ActionView by @strzalek but never referenced in any test.
* Remove helper fixtures not used in any testclaudiob2013-09-091-2/+0
| | | | | | The fixture for module AbcHelper defines three functions bare_a, bare_b and bare_c, but only bare_a is used in the code that tests helper functions.
* Move abstract's controller tests to AVŁukasz Strzałkowski2013-08-257-0/+31
| | | | The ones that were actually testing AV functionality and should belong in there
* Move remaining layouts tests to AVŁukasz Strzałkowski2013-08-2516-0/+26
|
* Move render_test to AVŁukasz Strzałkowski2013-08-2591-0/+150
|
* Move view_paths from AP to AVŁukasz Strzałkowski2013-08-252-0/+2
|
* Fix "Stack Level Too Deep" error when rendering recursive partialsRafael Mendonça França2013-07-072-0/+2
| | | | | | | When rendering recursive partial Action View is trying to generate the view digest infinitly causing a stack level error. Fixes #11340
* Restore mistakenly removed malformed file fixturesŁukasz Strzałkowski2013-06-205-0/+5
|
* Fix digestor testsŁukasz Strzałkowski2013-06-201-1/+2
|
* Copy company test fixture to AV (fixes failing test)Łukasz Strzałkowski2013-06-201-0/+9
|
* Remove unneeded test fixtures in AVPiotr Sarnacki2013-06-20129-277/+0
|
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-20293-0/+708