title: rspec/capybara: how to simulate incoming POST requests? (rack-test won't work)
body: <p>I need to receive incoming emails as multipart-formdata via a POST request from Cloudmailin.  The POST resembles the following:</p>
  
  <pre><code>Parameters: {"to"=&gt;"&lt;email@exmaple.comt&gt;", "from"=&gt;"whomever@example", "subject"=&gt;"my awesome subject line....
  </code></pre>
  
  <p>Actually, receiving and parsing emails is super easy because the email is just posted as params:  params[:to], params[:from], etc.  However, how do I simulate this POST request in rails?</p>
  
  <p>I built a dummy rails app to test out Cloudmailin, so I have an actual request.  However, it's a 6k character file, so I'd like to load this file as the parameters of the POST request.  I've tried using the built rails post and post_via_redirect methods to load a file, but it escapes all of the parameters( \"to\"), which is no good.  Any ideas?</p>