I have a banner with an attached file using paperclip. A clip will create derivatives for the loaded image using the styles parameter:
class Banner < ActiveRecord::Base has_attached_file :image, :styles => {:medium => "300x300>", :thumb => "100x100>"} end
I want to test this attach_file creation, preferably without testing the whole roundtrip to disk and so on. I could create a banner, attach a file, and then look at the file system if a specific file with certain sizes is created, but this contradicts my idea of ββtesting the concentrated part, without testing the entire stack.
How to check if an attached file :image certain styles in a folder?
source share