Skip to content

Instantly share code, notes, and snippets.

@sadjow
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sadjow/7e045f9de0a3271a9260 to your computer and use it in GitHub Desktop.
Save sadjow/7e045f9de0a3271a9260 to your computer and use it in GitHub Desktop.
Avoid paperclip to process the images in tests.
# 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