28 lines
935 B
Diff
28 lines
935 B
Diff
From fc1badb817ef9191efb7c26c606a6a8fb66c540b Mon Sep 17 00:00:00 2001
|
|
From: Andrew White <andrew.white@unboxed.co>
|
|
Date: Sat, 12 Sep 2020 06:47:40 +0100
|
|
Subject: [PATCH] Fix Action View deprecation warning
|
|
|
|
Rails 6.0+ prints a deprecation warning when calling
|
|
ActionView::Base.new without a lookup context.
|
|
---
|
|
test/test_helper.rb | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
|
|
index 4422e4c..82876ec 100644
|
|
--- a/test/test_helper.rb
|
|
+++ b/test/test_helper.rb
|
|
@@ -20,7 +20,7 @@ class HelperTest < ActionView::TestCase
|
|
tmp = File.expand_path("../../tmp", __FILE__)
|
|
@manifest = Sprockets::Manifest.new(@assets, tmp)
|
|
|
|
- @view = ActionView::Base.new
|
|
+ @view = ActionView::Base.new(ActionView::LookupContext.new([]))
|
|
@view.extend ::Sprockets::Rails::Helper
|
|
@view.assets_environment = @assets
|
|
@view.assets_manifest = @manifest
|
|
--
|
|
2.33.0
|
|
|