{"action":"opened","issue":{"url":"https://api.github.com/repos/akanshmurthy/railsbridge-testathon/issues/21","repository_url":"https://api.github.com/repos/akanshmurthy/railsbridge-testathon","labels_url":"https://api.github.com/repos/akanshmurthy/railsbridge-testathon/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/akanshmurthy/railsbridge-testathon/issues/21/comments","events_url":"https://api.github.com/repos/akanshmurthy/railsbridge-testathon/issues/21/events","html_url":"https://github.com/akanshmurthy/railsbridge-testathon/issues/21","id":188359401,"number":21,"title":"Cloudinary Input in Post Controller Spec","user":{"login":"camachom","id":15637784,"avatar_url":"https://avatars.githubusercontent.com/u/15637784?v=3","gravatar_id":"","url":"https://api.github.com/users/camachom","html_url":"https://github.com/camachom","followers_url":"https://api.github.com/users/camachom/followers","following_url":"https://api.github.com/users/camachom/following{/other_user}","gists_url":"https://api.github.com/users/camachom/gists{/gist_id}","starred_url":"https://api.github.com/users/camachom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camachom/subscriptions","organizations_url":"https://api.github.com/users/camachom/orgs","repos_url":"https://api.github.com/users/camachom/repos","events_url":"https://api.github.com/users/camachom/events{/privacy}","received_events_url":"https://api.github.com/users/camachom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-09T21:40:14Z","updated_at":"2016-11-09T21:40:14Z","closed_at":null,"body":"```ruby\r\n# post_controller_spec.rb line 126\r\nfile_io = fixture_file_upload 'files/bridgetroll.svg', 'image/svg'\r\n```\r\n\r\nfile_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. \r\n\r\n```ruby\r\nCloudinary::Uploader.upload(file, options = {})\r\n```\r\n\r\nI could easily fix this on line 127 by using (file_io.path) instead of the Tempfile itself. Also, by the recommendation of the [docs](http://ruby-doc.org/stdlib-1.9.3/libdoc/tempfile/rdoc/Tempfile.html#class-Tempfile-label-Explicit+close), Tempfiles should be explicitly garbage collected by using #unlink. "}}
{"actor":{"display_login":"camachom"}}