Create a Rack::Test::UploadedFile instance by calling #upload(content_type: 'image/png') (e.g.).
Rack::Test::UploadedFile
#upload(content_type: 'image/png')
The returned object can be passed as a parameter in a request spec to simulate uploading a file.