diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-02-15 15:48:55 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-02-16 13:00:28 +0900 |
commit | 7878027ca7de3dc13716f5efb088553fdd04d220 (patch) | |
tree | 679a84417b55807fdcd910a939eafa874a304a27 /actionview/test | |
parent | 16e235126ef0187a93b81ee959a8127097e2f394 (diff) | |
download | rails-7878027ca7de3dc13716f5efb088553fdd04d220.tar.gz rails-7878027ca7de3dc13716f5efb088553fdd04d220.tar.bz2 rails-7878027ca7de3dc13716f5efb088553fdd04d220.zip |
Show deprecated message instead of raise exception in `compiled_method_container` method
Since #35036, the subclasses of `ActionView::Base` requires
the `compiled_method_container`.
This is incompatible. For example, `web-console` use view class that
subclass of `ActionView::Base`, and does not work it now cause of this.
Actually, since it seems that it is only `ActionView::Base` that
`compiled_method_container` is necessary, modified the condition that
emits a warning.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/render_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index cda8c942d8..543df7a71a 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -367,6 +367,13 @@ module RenderTestCases end end + def test_without_compiled_method_container_is_deprecated + view = ActionView::Base.with_view_paths(ActionController::Base.view_paths) + assert_deprecated("ActionView::Base instances must implement `compiled_method_container`") do + assert_equal "Hello world!", view.render(file: "test/hello_world") + end + end + def test_render_partial_without_object_does_not_put_partial_name_to_local_assigns assert_equal "false", @view.render(partial: "test/partial_name_in_local_assigns") end |