Sha256: 532d8c883f10565fb04e88874b9ef4f782b5fb5e69f0afdca5ab3790c31db63d

Contents?: true

Size: 1.04 KB

Versions: 33

Compression:

Stored size: 1.04 KB

Contents

require 'fixtures/iiif_responses'
module StubIiifResponse
  def stub_iiif_response_for_url(url, response)
    allow(Spotlight::Resources::IiifService).to receive(:iiif_response).with(url).and_return(response)
  end

  def stub_default_collection
    allow_any_instance_of(Spotlight::Resources::IiifHarvester).to receive_messages(url_is_iiif?: true)
    stub_iiif_response_for_url('uri://for-top-level-collection', complex_collection)
    stub_iiif_response_for_url('uri://for-child-collection1', child_collection1)
    stub_iiif_response_for_url('uri://for-child-collection2', child_collection2)
    stub_iiif_response_for_url('uri://for-child-collection3', child_collection3)

    stub_iiif_response_for_url('uri://for-manifest1', test_manifest1)
    stub_iiif_response_for_url('uri://for-manifest2', test_manifest2)
    stub_iiif_response_for_url('uri://for-manifest3', test_manifest3)
    stub_iiif_response_for_url('uri://for-manifest4', test_manifest4)
  end
end

RSpec.configure do |config|
  config.include IiifResponses
  config.include StubIiifResponse
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
blacklight-spotlight-2.4.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.4.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.3.3 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.3.2 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.3.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.3.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.2.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.2.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.1.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.2 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc6 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc5 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc4 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc3 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc2 spec/support/stub_iiif_response.rb
blacklight-spotlight-2.0.0.rc1 spec/support/stub_iiif_response.rb
blacklight-spotlight-1.5.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-1.4.1 spec/support/stub_iiif_response.rb