Sha256: ec7192cf4818217bbf0a7582c745829ca045c00bb5a355c7a1980cbc8c983bb3

Contents?: true

Size: 1.07 KB

Versions: 73

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

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

73 entries across 73 versions & 1 rubygems

Version Path
blacklight-spotlight-4.3.6 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.5 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.4 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.3 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.2 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.3.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.2.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.1.2 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.1.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.1.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.0.3 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.0.2 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.0.1 spec/support/stub_iiif_response.rb
blacklight-spotlight-4.0.0 spec/support/stub_iiif_response.rb
blacklight-spotlight-3.6.0.beta10 spec/support/stub_iiif_response.rb
blacklight-spotlight-3.6.0.beta9 spec/support/stub_iiif_response.rb
blacklight-spotlight-3.6.0.beta8 spec/support/stub_iiif_response.rb
blacklight-spotlight-3.5.0.4 spec/support/stub_iiif_response.rb
blacklight-spotlight-3.6.0.beta7 spec/support/stub_iiif_response.rb