Sha256: ebeaace02ed5a940a3bfd1f6c0871e656930a50bdbd1d76256ce92e3b962c00f

Contents?: true

Size: 884 Bytes

Versions: 85

Compression:

Stored size: 884 Bytes

Contents

RSpec.shared_examples 'a Hyrax::DerivativeService' do
  before do
    raise 'valid_file_set must be set with `let(:valid_file_set)`' unless
      defined? valid_file_set
  end

  subject { described_class.new(file_set) }
  let(:file_set) { valid_file_set }

  it { is_expected.to respond_to(:create_derivatives).with(1).arguments }

  it { is_expected.to respond_to(:cleanup_derivatives).with(0).arguments }

  it { is_expected.to respond_to(:file_set) }

  it { is_expected.to respond_to(:mime_type) }

  it { is_expected.to respond_to(:derivative_url).with(1).arguments }

  describe "#valid?" do
    context "when given a file_set it handles" do
      let(:file_set) { valid_file_set }
      it { is_expected.to be_valid }
    end
  end

  it "takes a fileset as an argument" do
    obj = described_class.new(valid_file_set)
    expect(obj.file_set).to eq valid_file_set
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
hyrax-3.2.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.6 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.1.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.5 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.2 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.1 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.0.pre.rc4 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.4 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.0.pre.rc3 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.3 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.2 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.1 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.9.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-3.0.0.pre.rc2 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.8.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.7.2 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.7.1 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.7.0 lib/hyrax/specs/shared_specs/derivative_service.rb
hyrax-2.6.0 lib/hyrax/specs/shared_specs/derivative_service.rb