spec/unit/processor/ffmpeg_spec.rb in bulldog-0.0.8 vs spec/unit/processor/ffmpeg_spec.rb in bulldog-0.0.9

- old
+ new

@@ -49,17 +49,31 @@ def process_video(options={}, &block) configure(:video) do process(options.merge(:on => :event, :with => :ffmpeg), &block) end - @thing.video.process(:event) + @thing.video.process(:event, options) end describe "#process" do it "should run ffmpeg" do video_style :output Bulldog.expects(:run).once.with(ffmpeg, '-i', original_video_path, '-y', output_video_path) process_video + end + + it "should process the specified set of styles, if given, even those not in the configured style set" do + video_style :one + video_style :two + video_style :three + styles = [] + configure :video do + process(:on => :event, :with => :image_magick, :styles => [:one, :two]) do + styles << style.name + end + end + @thing.video.process(:event, :styles => [:two, :three]) + styles.should == [:two, :three] end it "should log the command run" do video_style :output log_path = "#{temporary_directory}/log"