spec/unit/processor/image_magick_spec.rb in bulldog-0.0.12 vs spec/unit/processor/image_magick_spec.rb in bulldog-0.0.13

- old
+ new

@@ -116,9 +116,21 @@ style :output, :colorspace => 'rgb' Bulldog.expects(:run).once.with(convert, "#{original_path}[0]", '-colorspace', 'rgb', output_path).returns('') process end + it "should add -strip if the :stripped style attribute is true" do + style :output, :stripped => true + Bulldog.expects(:run).once.with(convert, "#{original_path}[0]", '-strip', output_path).returns('') + process + end + + it "should add -strip if the :stripped style attribute is true" do + style :output, :stripped => false + Bulldog.expects(:run).once.with(convert, "#{original_path}[0]", output_path).returns('') + process + end + it "should use the :format style attribute to set the file extension if it's specified by the :extension interpolation key" do style :output, :format => 'png' Bulldog.expects(:run).once.with(convert, "#{original_path}[0]", output_path.sub(/jpg\z/, 'png')).returns('') process end