Sha256: 6a93bc21caf88596365502c4bcb6f7b7547458c71be261fc67fff1bfbe5d5d8d

Contents?: true

Size: 761 Bytes

Versions: 10

Compression:

Stored size: 761 Bytes

Contents

RSpec.shared_examples "an object that cannot be captioned" do
  it { is_expected.to_not be_captioned }
  its(:captionable?) { is_expected.to be false }
end

RSpec.shared_examples "an object that can be captioned" do
  it { is_expected.to_not be_captioned }
  its(:captionable?) { is_expected.to be true }

  describe "when caption file is present" do
    before {
      subject.add_file(fixture_file_upload('abcd1234.vtt', 'text/vtt'), 'caption')
      subject.save!
    }
    specify {
      expect(subject).to be_captioned
      expect(subject.caption_path).to be_present
      expect(subject.caption_path).to eq subject.caption.file_path
      expect(subject.caption_type).to eq 'text/vtt'
      expect(subject.caption_extension).to eq 'vtt'
    }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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