I''ve just submitted a rails patch
http://dev.rubyonrails.org/ticket/11091
This patches actionpack/lib/action_controller/integration.rb so that
post and put requests automatically get turned into multipart form
submission requests if they have a parameter or parameters which are
instances of TestUploadedFile.
This allows file uploading to be tested in integration controllers.
This is a new answer tohttp://dev.rubyonrails.org/ticket/4635 which
has been open for 2 years. There are three differences between the
two year old patch and this one.
1) This patch includes a test
2) Instead of a separate multi_part_post method, this patch makes
normal post and put requests (as well as post_via_redirect, and
put_via_redirect work for muitpart posting. The ability to work with
both post and put seems important for RESTful purposes.
3) It was just built against the curent edge Rails.
Please have a look if interested and verify the patch, looking for +1s
on the Rails Trac
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---