spec/paperclip/geometry_detector_spec.rb in kt-paperclip-7.2.0 vs spec/paperclip/geometry_detector_spec.rb in kt-paperclip-7.2.1

- old
+ new

@@ -33,6 +33,15 @@ expect(output).to eq :correct ensure Paperclip.options[:use_exif_orientation] = true end end + + it "raises an exception with a message when the file is not an image" do + file = fixture_file("text.txt") + factory = Paperclip::GeometryDetector.new(file) + + expect do + factory.make + end.to raise_error(Paperclip::Errors::NotIdentifiedByImageMagickError, "Could not identify image size") + end end