Created
May 20, 2011 13:19
-
-
Save cgunther/982869 to your computer and use it in GitHub Desktop.
Paperclip stubbing
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
module Paperclip | |
# We don't need to be testing that thumbnails are created | |
class Attachment | |
private | |
def post_process_styles | |
true | |
end | |
end | |
class Geometry | |
def self.from_file file | |
parse("100x100") | |
end | |
end | |
# Overwrite #flush_writes so we don't actually reach out to S3 | |
module Storage | |
module S3 | |
def flush_writes | |
@queued_for_write.each { |style, file| file.close } | |
@queued_for_write = {} | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment