Sha256: ddc9f1116c0638abb276483fb5406ed7a785427cc2eb80b264f7ef06f26e4448
Contents?: true
Size: 835 Bytes
Versions: 39
Compression:
Stored size: 835 Bytes
Contents
# frozen_string_literal: true module ControllerLevelHelpers # This provides some common mock methods for view tests. # These are normally provided by the controller. module ControllerViewHelpers def search_state @search_state ||= CatalogController.search_state_class.new(params, blacklight_config, controller) end # This allows you to set the configuration # @example: view.blacklight_config = Blacklight::Configuration.new attr_writer :blacklight_config def blacklight_config @blacklight_config ||= CatalogController.blacklight_config end def blacklight_configuration_context @blacklight_configuration_context ||= Blacklight::Configuration::Context.new(controller) end end def initialize_controller_helpers(helper) helper.extend ControllerViewHelpers end end
Version data entries
39 entries across 39 versions & 1 rubygems