Sha256: ca3a9c745aeeeff82f130e4374fe8527ed28b0beeb7dbf5b4ed5415f4d122461

Contents?: true

Size: 866 Bytes

Versions: 1

Compression:

Stored size: 866 Bytes

Contents

require 'simple_pvr'

module SimplePvr
  describe Ffmpeg do
    it 'spawns an ffmpeg process for creating thumbnails' do
      Process.should_receive(:spawn)
      Process.should_receive(:detach)
  
      Ffmpeg.create_thumbnail_for('path/to/show')
    end
  
    it 'spawns an ffmpeg process for transcoding to WebM' do
      File.should_receive(:exists?).with('path/to/show/stream.webm').and_return(false)
      Process.should_receive(:spawn)
      Process.should_receive(:detach)
  
      Ffmpeg.transcode_to_webm('path/to/show')
    end
  
    it 'does not start ffmpeg for transcoding to WebM if WebM file already exists' do
      File.should_receive(:exists?).with('path/to/show/stream.webm').and_return(true)
      Process.should_not_receive(:spawn)
      Process.should_not_receive(:detach)
  
      Ffmpeg.transcode_to_webm('path/to/show')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_pvr-1.1.0 spec/simple_pvr/ffmpeg_spec.rb