Welcome to mirror list, hosted at ThFree Co, Russian Federation.

form_builder_helpers.rb « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4bae7421c4dcd20e278a7ffdd75462db1e1c5f52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

module FormBuilderHelpers
  def fake_action_view_base
    lookup_context = ActionView::LookupContext.new(ActionController::Base.view_paths)

    ActionView::Base.new(lookup_context, {}, ApplicationController.new)
  end

  def fake_form_for(&block)
    fake_action_view_base.form_for :user, url: '/user', &block
  end
end