def paperclip_fixture(model, attachment, extension)
      stub_paperclip_s3(model, attachment, extension)
      base_path = File.join(File.dirname(__FILE__), "..", "..",
                            "features", "support", "paperclip")
      File.new(File.join(base_path, model, "#{attachment}.#{extension}"))
    end
def paperclip_fixture(model, attachment, extension)
      stub_paperclip_s3(model, attachment, extension)
      base_path = File.join(File.dirname(__FILE__), "..", "..",
                            "features", "support", "paperclip")
      File.new(File.join(base_path, model, "#{attachment}.#{extension}"))
    end
Stub S3 and return a file for attachment. Best with Factory Girl.
 Uses a strict directory convention:

     features/support/paperclip

 This method is used by the Paperclip-provided Cucumber step:

     When I attach a "demo_tape" "mp3" file to a "band" on S3

 @example
   Factory.define :band_with_demo_tape, :parent => :band do |band|
     band.demo_tape { band.paperclip_fixture("band", "demo_tape", "png") }
   end