Sha256: 31fedb81f6b81580c281147cac4dba2739213981c4f50050ec07223244225872

Contents?: true

Size: 308 Bytes

Versions: 89

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module PresenterTestHelpers
  def controller
    @controller ||= ViewComponent::Base.test_controller.constantize.new.tap { |c| c.request = request }.extend(Rails.application.routes.url_helpers)
  end

  def request
    @request ||= ActionDispatch::TestRequest.create
  end
end

Version data entries

89 entries across 88 versions & 3 rubygems

Version Path
blacklight_range_limit-9.0.0.beta1 spec/support/presenter_test_helpers.rb
blacklight-8.6.1 spec/support/presenter_test_helpers.rb
blacklight-7.40.0 spec/support/presenter_test_helpers.rb
blacklight-8.6.0 spec/support/presenter_test_helpers.rb
blacklight-8.5.1 spec/support/presenter_test_helpers.rb
blacklight-8.5.0 spec/support/presenter_test_helpers.rb
blacklight-7.39.0 spec/support/presenter_test_helpers.rb
blacklight-8.4.0 spec/support/presenter_test_helpers.rb
blacklight-7.38.0 spec/support/presenter_test_helpers.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/support/presenter_test_helpers.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/support/presenter_test_helpers.rb
blacklight-8.3.0 spec/support/presenter_test_helpers.rb
blacklight-8.2.2 spec/support/presenter_test_helpers.rb
blacklight-8.2.1 spec/support/presenter_test_helpers.rb
blacklight-8.2.0 spec/support/presenter_test_helpers.rb
blacklight-7.37.0 spec/support/presenter_test_helpers.rb
blacklight_range_limit-8.5.0 spec/support/presenter_test_helpers.rb
blacklight-7.36.2 spec/support/presenter_test_helpers.rb
blacklight-7.36.1 spec/support/presenter_test_helpers.rb
blacklight-7.36.0 spec/support/presenter_test_helpers.rb