rails/actionpack/test/fixtures
Yasuo Honda 41939a0ed5 Address RendererTest#test_rendering_with_a_class_renderer failure against Ruby 3.4.0dev
This commit addresses the following Rails Nightly CI error since https://github.com/ruby/ruby/pull/10262 .
https://buildkite.com/rails/rails-nightly/builds/310#018e5929-ff70-4397-b978-9a0a03cd4706/1255-1265

- Without this commit:
```ruby
$ ruby -v
ruby 3.4.0dev (2024-03-19T08:26:49Z master 12be40ae6b) [x86_64-linux]
$ cd actionpack
$ RAILS_STRICT_WARNINGS=true bin/test test/controller/renderer_test.rb:37
Running 25 tests in a single process (parallelization threshold is 50)
Run options: --seed 14013

/home/yahonda/src/github.com/rails/rails/actionpack/test/fixtures/ruby_template.ruby:2: warning: literal string will be frozen in the future
E

Error:
RendererTest#test_rendering_with_a_class_renderer:
RuntimeError: Neutered Exception ActionView::Template::Error: /home/yahonda/src/github.com/rails/rails/actionpack/test/fixtures/ruby_template.ruby:2: warning: literal string will be frozen in the future

    /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/testing/strict_warnings.rb:33:in 'ActiveSupport::RaiseWarnings#warn'
    test/fixtures/ruby_template.ruby:2:in '_home_yahonda_src_github_com_rails_rails_actionpack_test_fixtures_ruby_template_ruby__3648742137162546161_6360'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/base.rb:282:in 'Kernel#public_send'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/base.rb:282:in 'ActionView::Base#_run'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/template.rb:275:in 'block in ActionView::Template#render'
    /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/notifications.rb:212:in 'ActiveSupport::Notifications.instrument'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/template.rb:567:in 'ActionView::Template#instrument_render_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/template.rb:263:in 'ActionView::Template#render'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/template_renderer.rb:66:in 'block (2 levels) in ActionView::TemplateRenderer#render_template'
    /home/yahonda/src/github.com/rails/rails/activesupport/lib/active_support/notifications.rb:212:in 'ActiveSupport::Notifications.instrument'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/template_renderer.rb:60:in 'block in ActionView::TemplateRenderer#render_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/template_renderer.rb:80:in 'ActionView::TemplateRenderer#render_with_layout'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/template_renderer.rb:59:in 'ActionView::TemplateRenderer#render_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/template_renderer.rb:11:in 'ActionView::TemplateRenderer#render'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/renderer.rb:58:in 'ActionView::Renderer#render_template_to_object'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/renderer/renderer.rb:31:in 'ActionView::Renderer#render_to_object'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/rendering.rb:135:in 'block in ActionView::Rendering#_render_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/base.rb:309:in 'ActionView::Base#in_rendering_context'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/rendering.rb:134:in 'ActionView::Rendering#_render_template'
    lib/action_controller/metal/streaming.rb:258:in 'ActionController::Streaming#_render_template'
    /home/yahonda/src/github.com/rails/rails/actionview/lib/action_view/rendering.rb:121:in 'ActionView::Rendering#render_to_body'
    lib/action_controller/metal/rendering.rb:186:in 'ActionController::Rendering#render_to_body'
    lib/action_controller/metal/renderers.rb:142:in 'ActionController::Renderers#render_to_body'
    lib/abstract_controller/rendering.rb:47:in 'AbstractController::Rendering#render_to_string'
    lib/action_controller/metal/rendering.rb:175:in 'ActionController::Rendering#render_to_string'
    lib/action_controller/renderer.rb:136:in 'ActionController::Renderer#render'
    test/controller/renderer_test.rb:37:in 'block in <class:RendererTest>'

bin/test test/controller/renderer_test.rb:35

Finished in 0.294798s, 3.3921 runs/s, 0.0000 assertions/s.
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
$
```

Refer to these Ruby issue and pull request for this change:
https://bugs.ruby-lang.org/issues/20205
https://github.com/ruby/ruby/pull/10262

Co-authored-by: Rafael Mendonça França <rafael@franca.dev>
2024-03-21 07:08:38 +09:00
..
alternate_helpers Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
collection_cache Make collection caching explicit. 2016-02-20 16:54:32 +01:00
customers Replace expectation with state check. 2015-05-30 18:57:10 +02:00
filter_test/implicit_actions Add a failing test case for an implicit action with a before filter. 2011-03-23 23:32:44 +00:00
functional_caching Replaces the "hash rocket" operator in favor of the newer Ruby syntax when rendering on render 2021-10-03 23:33:56 -03:00
helpers Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
helpers1_pack Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
helpers2_pack Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
helpers_typo/admin Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
implicit_render_test Additional review of 6b31761. 2016-02-25 11:13:42 +01:00
layouts Replaces the "hash rocket" operator in favor of the newer Ruby syntax when rendering on render 2021-10-03 23:33:56 -03:00
localized Add support to locales with lowdash in Resolver::PathParser 2022-01-14 15:11:58 -03:00
multipart Remove mona lisa image from the tests 2016-10-25 12:31:35 -02:00
namespaced/implicit_render_test Fix adding implicitly rendered namespaced template digests to ETags 2016-07-13 15:07:49 -04:00
old_content_type Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" 2017-07-02 02:15:17 +09:30
post_test Fixed the layout defaults (closes #9564) [lifo] 2007-09-28 01:23:20 +00:00
public Allow serving compressed SVG images 2023-12-14 11:38:07 -05:00
respond_to Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" 2017-07-02 02:15:17 +09:30
session_autoload_test/session_autoload_test Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
star_star_mime add the fixture file 2010-11-22 23:06:13 +01:00
test Removing ActionPack fixture views that are not used anymore 2023-11-21 22:59:07 -03:00
公共 Allow serving compressed SVG images 2023-12-14 11:38:07 -05:00
_top_level_partial_only.erb Fix rendering partials at the top level [#795 state:resolved] 2008-08-13 19:15:35 -05:00
company.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
load_me.rb Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
ruby_template.ruby Address RendererTest#test_rendering_with_a_class_renderer failure against Ruby 3.4.0dev 2024-03-21 07:08:38 +09:00
shared.html.erb Fixed render :template for templates in top level of view path. [#54 state:resolved] 2008-05-01 10:21:46 +01:00