Sha256: 9c8f4f1b0bcb0c46a713960b52c816c71efb777374b80df728f5f7ab5ce72a1b

Contents?: true

Size: 643 Bytes

Versions: 3

Compression:

Stored size: 643 Bytes

Contents

RSpec.shared_examples "a scanned media presenter" do
  let(:solr_document) { SolrDocument.new(attributes) }
  let(:request) { double(host: 'example.org') }
  let(:user_key) { 'a_user_key' }

  let(:scanned_media_attributes) do
    { "text_direction" => 'left',
      "page_number" => '5',
      "section" => '1' }
  end

  let(:ability) { nil }
  let(:presenter) { described_class.new(solr_document, ability, request) }

  it { is_expected.to delegate_method(:text_direction).to(:solr_document) }
  it { is_expected.to delegate_method(:page_number).to(:solr_document) }
  it { is_expected.to delegate_method(:section).to(:solr_document) }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 spec/presenters/newspaper_works/scanned_media_presenter_spec.rb
newspaper_works-1.0.0 spec/presenters/newspaper_works/scanned_media_presenter_spec.rb
newspaper_works-0.1.0 spec/presenters/newspaper_works/scanned_media_presenter_spec.rb