# post_controller_spec.rb line 126
file_io = fixture_file_upload 'files/bridgetroll.svg', 'image/svg'
file_io is a Tempfile which is then passed into params[:post][:image]. In this case, the Cloudinary API requires a path to a file, so no matter what students do in the post_controller, they won't be able to successfully make the API call.
Cloudinary::Uploader.upload(file, options = {})
I could easily fix this on line 127 by using (file_io.path) instead of the Tempfile itself. Also, by the recommendation of the docs, Tempfiles should be explicitly garbage collected by using #unlink.
file_io is a Tempfile which is then passed into params[:post][:image]. In this case, the Cloudinary API requires a path to a file, so no matter what students do in the post_controller, they won't be able to successfully make the API call.
I could easily fix this on line 127 by using (file_io.path) instead of the Tempfile itself. Also, by the recommendation of the docs, Tempfiles should be explicitly garbage collected by using #unlink.