diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-05-20 10:19:12 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-05-20 10:19:12 +0900 |
commit | ce4d467f7c2fc812e257a87bd4875c1f1f08a981 (patch) | |
tree | 0b16d92516dcf02be5bd65e2b483abda5a4f1216 /railties/test | |
parent | 5f8115a1859ee883b3289c1e5ed8e5924e4a61b4 (diff) | |
download | rails-ce4d467f7c2fc812e257a87bd4875c1f1f08a981.tar.gz rails-ce4d467f7c2fc812e257a87bd4875c1f1f08a981.tar.bz2 rails-ce4d467f7c2fc812e257a87bd4875c1f1f08a981.zip |
Add test case that configure `config.action_view.finalize_compiled_template_methods`
Follow up of #32418.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index 84606d3b90..c2699006f6 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1979,6 +1979,23 @@ module ApplicationTests assert_equal true, ActionView::Helpers::FormTagHelper.default_enforce_utf8 end + test "ActionView::Template.finalize_compiled_template_methods is true by default" do + app "test" + assert_equal true, ActionView::Template.finalize_compiled_template_methods + end + + test "ActionView::Template.finalize_compiled_template_methods can be configured via config.action_view.finalize_compiled_template_methods" do + app_file "config/environments/test.rb", <<-RUBY + Rails.application.configure do + config.action_view.finalize_compiled_template_methods = false + end + RUBY + + app "test" + + assert_equal false, ActionView::Template.finalize_compiled_template_methods + end + private def force_lazy_load_hooks yield # Tasty clarifying sugar, homie! We only need to reference a constant to load it. |