diff options
Diffstat (limited to 'actionview/test/template/render_test.rb')
-rw-r--r-- | actionview/test/template/render_test.rb | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/actionview/test/template/render_test.rb b/actionview/test/template/render_test.rb index f0b5d7d95e..2235a7816f 100644 --- a/actionview/test/template/render_test.rb +++ b/actionview/test/template/render_test.rb @@ -33,6 +33,11 @@ module RenderTestCases assert_equal ORIGINAL_LOCALES, I18n.available_locales.map(&:to_s).sort end + def teardown + I18n.reload! + ActionController::Base.view_paths.map(&:clear_cache) + end + def test_implicit_format_comes_from_parent_template rendered_templates = JSON.parse(@controller_view.render(template: "test/mixing_formats")) assert_equal({ "format" => "HTML", @@ -677,11 +682,6 @@ class CachedViewRenderTest < ActiveSupport::TestCase assert_equal ActionView::OptimizedFileSystemResolver, view_paths.first.class setup_view(view_paths) end - - def teardown - GC.start - I18n.reload! - end end class LazyViewRenderTest < ActiveSupport::TestCase @@ -697,11 +697,6 @@ class LazyViewRenderTest < ActiveSupport::TestCase setup_view(view_paths) end - def teardown - GC.start - I18n.reload! - end - def test_render_utf8_template_with_magic_comment with_external_encoding Encoding::ASCII_8BIT do result = @view.render(template: "test/utf8_magic", formats: [:html], layouts: "layouts/yield") @@ -758,10 +753,6 @@ class CachedCollectionViewRenderTest < ActiveSupport::TestCase setup_view(view_paths) end - teardown do - I18n.reload! - end - test "template body written to cache" do customer = Customer.new("david", 1) key = cache_key(customer, "test/_customer") |