rails/actionview/test
Sean Doyle 520cd8f0e3 Action View Test Case rendered memoization
Follow-up to [49856][]
Follow-up to [49194][]

The introduction of memoization as an optimization posed a backwards
incompatible change to View tests that call `render` multiple times.

This commit changes the `@rendered` instance variable from a `String` to
an instance of the `RenderedViewContent` specialized `String` subclass.

The end result is that there is no memoization to reset, and the
memoization optimization side-effect is preserved after rendering for
test cases where `rendered` (or parser methods like `rendered.html`)
might be invoked more than once.

[49856]: https://github.com/rails/rails/pull/49856#issuecomment-1945039015
[49194]: https://github.com/rails/rails/pull/49194/files#diff-ce84a807f3491121a5230d37bd40454bb1407fcca71179e1a2fa76d4c0ddfa2aR293
2024-02-14 20:37:47 -05:00
..
actionpack Prevent assigning internal ivars to AV::Base 2023-11-03 20:52:47 -04:00
activerecord Expose assert_queries_match and assert_no_queries_match assertions 2023-12-21 01:30:16 +02:00
fixtures Introduce ActionView::TestCase.register_parser 2023-09-27 02:03:23 +00:00
lib Fix form_for id generation for new CPK models 2023-08-28 15:56:25 -05:00
template Action View Test Case rendered memoization 2024-02-14 20:37:47 -05:00
abstract_unit.rb Get rid of the jruby_skip test helper 2023-10-02 13:01:44 +02:00
active_record_unit.rb Introducs TestFixtures#fixture_paths. 2023-03-14 19:02:56 -04:00
buffers_test.rb Add OutputBuffer#raw and #capture to reduce the need to swap the buffer 2022-08-03 12:56:34 +02:00