title: Testing redirect_back with Rspec in Rails 5
body: <p>I'm upgrading my Rails 5 app now, and currently overcoming the following deprecation:</p>
  
  <pre><code>DEPRECATION WARNING: `redirect_to :back` is deprecated and will be removed from Rails 5.1. Please use `redirect_back(fallback_location: fallback_location)` where `fallback_location` represents the location to use if the request has no HTTP referer information. (called from block (3 levels) in &lt;top (required)&gt; at /path/to/some/controller_spec.rb:74)
  </code></pre>
  
  <p>No worries. Just switched the controller to the new format:</p>
  
  <pre><code>redirect_back(fallback_location: home_path, message: "Some error")
  </code></pre>
  
  <p>However, the warning doesn't disappear, because the test still looks at <code>:back</code>, like this:</p>
  
  <pre><code>expect(response).to redirect_to(:back)
  </code></pre>
  
  <p>I don't see any preferred way to overcome this deprecation. Is there another way to test this without manually specifying a <code>HTTP_REFERER</code> in my test?</p>