Sha256: 31fedb81f6b81580c281147cac4dba2739213981c4f50050ec07223244225872

Contents?: true

Size: 308 Bytes

Versions: 96

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

96 entries across 95 versions & 3 rubygems

Version Path
blacklight-7.25.0 spec/support/presenter_test_helpers.rb
blacklight-7.24.0 spec/support/presenter_test_helpers.rb
blacklight-7.23.0.1 spec/support/presenter_test_helpers.rb
blacklight-7.23.0 spec/support/presenter_test_helpers.rb
blacklight-7.22.2 spec/support/presenter_test_helpers.rb
blacklight-7.22.1 spec/support/presenter_test_helpers.rb
blacklight-7.22.0 spec/support/presenter_test_helpers.rb
blacklight-7.21.2 spec/support/presenter_test_helpers.rb
blacklight-7.21.1 spec/support/presenter_test_helpers.rb
blacklight-7.21.0 spec/support/presenter_test_helpers.rb
blacklight-7.20.1 spec/support/presenter_test_helpers.rb
blacklight-7.20.0 spec/support/presenter_test_helpers.rb
blacklight-7.19.2 spec/support/presenter_test_helpers.rb
blacklight-7.19.1 spec/support/presenter_test_helpers.rb
blacklight-7.19.0 spec/support/presenter_test_helpers.rb
blacklight-7.18.1 spec/support/presenter_test_helpers.rb
blacklight-7.18.0 spec/support/presenter_test_helpers.rb
blacklight-7.17.2 spec/support/presenter_test_helpers.rb
blacklight-7.17.1 spec/support/presenter_test_helpers.rb
blacklight-7.17.0 spec/support/presenter_test_helpers.rb