Sha256: 7e587467aa10a0154abbc6b36e4292b92a85504aae2991bd80ec7333481367e7

Contents?: true

Size: 835 Bytes

Versions: 10

Compression:

Stored size: 835 Bytes

Contents

RSpec.shared_examples "an object that cannot be streamable" do
  it { is_expected.to_not be_streamable }
  its(:can_be_streamable?) { is_expected.to be false }
end

RSpec.shared_examples "an object that can be streamable" do
  it { is_expected.to_not be_streamable }
  its(:can_be_streamable?) { is_expected.to be true }

  describe "when streamable media is present" do
    before {
      subject.add_file(fixture_file_upload('bird.jpg', 'image/jpeg'), 'streamableMedia')
      subject.save!
    }
    specify {
      expect(subject).to be_streamable
      expect(subject.streamable_media_type).to eq 'image/jpeg'
      expect(subject.streamable_media_path).to be_present
      expect(subject.streamable_media_path).to eq subject.streamableMedia.file_path
      expect(subject.streamable_media_extension).to eq 'jpeg'
    }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ddr-models-2.11.0 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.10.2 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.10.1 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.10.0 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.10.0.rc2 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.10.0.rc1 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.9.2 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.9.1 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.9.0 spec/support/shared_examples_for_streamable_media.rb
ddr-models-2.9.0.rc1 spec/support/shared_examples_for_streamable_media.rb