Update the way we create form builders in tests

We were getting a warning in Rails 6:

DEPRECATION WARNING: ActionView::Base instances should be constructed
with a lookup context, assignments, and a controller.
This commit is contained in:
Javi Martín
2021-09-19 00:09:18 +02:00
parent 94d4e1db1e
commit effd646e54
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ describe ConsulFormBuilder do
stub_const("DummyModel::OPTIONS", %w[Good Bad Ugly].freeze)
end
let(:builder) { ConsulFormBuilder.new(:dummy, DummyModel.new, ActionView::Base.new, {}) }
let(:builder) { ConsulFormBuilder.new(:dummy, DummyModel.new, ApplicationController.new.view_context, {}) }
describe "hints" do
it "does not generate hints by default" do