Sha256: 551c79aec6c750d88d5714b0b7e6f1328417c31e3914576b672198ad76eca1ef

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe Hydra::Derivatives::Video do
  describe "when arguments are passed as a hash" do
    describe "and datastream is provided as an argument" do
      let(:directives) {{ :thumb => {format: "webm", datastream: 'thumbnail'} }}
      subject { Hydra::Derivatives::Video.new(double(:obj), 'content', directives)}
      it "should create a datastream with the specified name" do
        subject.should_receive(:encode_datastream).with("thumbnail", "webm", 'video/webm', "-s 320x240 -g 30 -b:v 345k -acodec libvorbis -ac 2 -ab 96k -ar 44100")
        subject.process

      end
    end

    describe "and datastream is not provided as an argument" do
      let(:directives) {{ :thumb => {format: "webm"} }}
      subject { Hydra::Derivatives::Video.new(double(:obj), 'content', directives)}
      it "should create a datastream and infer the name" do
        subject.should_receive(:encode_datastream).with("content_thumb", "webm", 'video/webm', "-s 320x240 -g 30 -b:v 345k -acodec libvorbis -ac 2 -ab 96k -ar 44100")
        subject.process

      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hydra-derivatives-0.0.7 spec/units/video_spec.rb
hydra-derivatives-0.0.6 spec/units/video_spec.rb
hydra-derivatives-0.0.5 spec/units/video_spec.rb
hydra-derivatives-0.0.4 spec/units/video_spec.rb
hydra-derivatives-0.0.3 spec/units/video_spec.rb
hydra-derivatives-0.0.2 spec/units/video_spec.rb