use this:
http://api.rubyonrails.org/classes/ActionController/TestUploadedFile.html
like:
file =
ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path
+ ''/files/test.gif'', ''image/gif'')
post(:uploader, :file => get_file)
and then test if entries in your db are as expected and the file exists
in destination path
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---