I am relatively new to rails. I want to include paperclip with FactoryGirl in my unit tests. A snippet from my code looks like
class User
has_attached_file :photo,
:styles => {
:medium => "200x200"
}
validates_attachment_content_type :photo, :content_type => /\Aimage\/.*\Z/
end
I am aware of this question How Do I Use Factory Girl To Generate A Paperclip Attachment? but it is an old post.
I also want to note that, the images i want to test are not local, but a URL is provided to Paperclip to fetch the image and resize it. Is it possible to include paperclip inside the factories?.
Thanks a lot, Shady