search for: uploaded_jpeg

Displaying 2 results from an estimated 2 matches for "uploaded_jpeg".

2006 Jul 20
0
possible file upload bug in integration test
...t = Tempfile.new(filename) FileUtils.copy_file(path, t.path) (class << t; self; end;).class_eval do alias local_path path define_method(:original_filename) { filename } define_method(:content_type) { content_type } end return t end # a JPEG helper def uploaded_jpeg(path, filename=nil) uploaded_file(path, ''image/jpeg'', filename) end def test_this file = uploaded_jpeg("/tmp/foo.jpg") post "/images/post", :file => file end When i did this, each time the post was done, the ''file'' par...
2006 Dec 30
2
Another RSpec on Rails issue: how to test send_file()
Hi! Today I needed to implement some controller code, that uses send_file() to send image data. How can this be tested / specified with RSpec? bye, Tobias