aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/abstract_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/abstract_unit.rb')
-rw-r--r--actionview/test/abstract_unit.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb
index d71944e938..2c1b277b41 100644
--- a/actionview/test/abstract_unit.rb
+++ b/actionview/test/abstract_unit.rb
@@ -48,7 +48,8 @@ module RenderERBUtils
@view ||= begin
path = ActionView::FileSystemResolver.new(FIXTURE_LOAD_PATH)
view_paths = ActionView::PathSet.new([path])
- ActionView::Base.new(view_paths)
+ view = ActionView::Base.with_empty_template_cache
+ view.with_view_paths(view_paths)
end
end
@@ -58,10 +59,11 @@ module RenderERBUtils
template = ActionView::Template.new(
string.strip,
"test template",
- ActionView::Template::Handlers::ERB,
- {})
+ ActionView::Template.handler_for_extension(:erb),
+ format: :html, locals: [])
- template.render(ActionView::Base.new, {}).strip
+ view = ActionView::Base.with_empty_template_cache
+ template.render(view.empty, {}).strip
end
end
@@ -203,3 +205,5 @@ class ActiveSupport::TestCase
skip message if defined?(JRUBY_VERSION)
end
end
+
+require_relative "../../tools/test_common"