I wrote a web app on top of Rack that includes the ability to accept file uploads. It took some time to figure out how to successfully test the file upload using Rack::Test.
The trick was to encode the file exactly correctly, and then post it with the correct headers. I wrote a simple post_file [...]