Class Mosquito::MockUpload
In: lib/mosquito.rb
Parent: StringIO

Works like a wrapper for a simulated file upload. To use:

  uploaded = Mosquito::MockUpload.new("beach.jpg")

This will create a file with the JPEG content-type and 122 bytes of purely random data, which can then be submitted as a part of the test request

Methods

inspect   new  

Constants

IMAGE_TYPES = {:jpg => 'image/jpeg', :png => 'image/png', :gif => 'image/gif', :pdf => 'application/pdf' }.stringify_keys

Attributes

content_type  [R] 
extension  [R] 
local_path  [R] 
original_filename  [R] 

Public Class methods

Public Instance methods

[Validate]