I am trying to write specs for a working file upload functionality using attachment_fu. However, the sample code given by the author for testing requires me to require action_controller/test_process
so that I have access to ActionController::UploadedStringIO
class. I have used this before in rails 2.x but for rails 3, it fails to locate the test_process
file.
How do I go ahead with testing the file upload functionality in rails 3?
Rack::Test::UploadedFile.new
! withinclude ActionDispatch::TestProcess
I was somehow getting strange behaviour with factory girl... – Estranged