mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add test case that configure config.action_view.finalize_compiled_template_methods
Follow up of #32418.
This commit is contained in:
parent
5f8115a185
commit
ce4d467f7c
1 changed files with 17 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue