Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module Paperclip
class Geometry
def self.from_file file
parse("100x100")
end
end
class Thumbnail
def make
src = Test::FileHelper.fixture_file('white_pixel.jpg')
dst = Tempfile.new([@basename, @format].compact.join("."))
dst.binmode
FileUtils.cp(src.path, dst.path)
return dst
end
end
end
@inspire22

This comment has been minimized.

Copy link

inspire22 commented Jul 22, 2013

Where is Test::FileHelper from?

@asselstine

This comment has been minimized.

Copy link

asselstine commented Aug 1, 2014

@inspire22 you can also use Rails.root.join('spec','fixtures','filename.png') or whatever your path is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.