attachment_fu testing in rails 3

前端 未结 3 498
轻奢々
轻奢々 2020-12-09 11:48

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

3条回答
  •  醉梦人生
    2020-12-09 12:44

    This was somewhat tricky to find for Rails 3

    You can still use the fixture_file_upload function, but you have to add:

    include ActionDispatch::TestProcess

    To your test case.

    This didn't work at all with Rspec. I just had to grab the file itself and post the file directly.

提交回复
热议问题