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:
parent
bb882daeae
commit
4f798fc5d8
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue