Ensure image processing gets disabled again, even after exceptions

Otherwise this leaves it enabled if the processing failed, which then
makes other specs fail where they expect the image not being processed
(for example still have the initial set dimensions, instead of the one
read from image after processing).
This commit is contained in:
Benjamin Neff 2023-11-13 00:55:48 +01:00
parent bb882daeae
commit 4f798fc5d8
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -6,9 +6,9 @@
def with_carrierwave_processing(&block)
UnprocessedImage.enable_processing = true
val = yield
yield
ensure
UnprocessedImage.enable_processing = false
val
end
describe Photo, :type => :model do