fixture_file_upload Example


/ Published in: Ruby
Save to your folder(s)

fixture_file_upload is another nifty Rails testing feature. It allows you to create "MIME-encoded content that would normally be uploaded by a browser input field." (Part in quotes straight from Agile Web Development with Rails, v2). Put your files to test in test/fixtures/files. You have to create the 'files' directory; rails doesn't do it for you.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.