Last active
August 29, 2015 14:26
-
-
Save sadjow/7e045f9de0a3271a9260 to your computer and use it in GitHub Desktop.
Avoid paperclip to process the images in tests.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Avoid paperclip to process the images in tests. | |
module Paperclip | |
class << self | |
alias_method :old_run, :run | |
def run cmd, params = "", expected_outcodes = 0 | |
case cmd | |
when "identify" | |
return old_run(cmd, params, expected_outcodes) | |
when "convert" | |
return | |
else | |
super | |
end | |
end | |
end | |
end | |
class Paperclip::Attachment | |
def post_process | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment