title: Is it ok to use Post.first instead of assigns(:post) in a controller test?
body: <p>In a rails (4.2.x) app, in controller tests, I see a lot of examples where they use <code>assigns(:post)</code>, where I could use <code>Post.first</code> or <code>Post.find_by(title: 'foo')</code> instead. I don't understand the need for <code>assigns</code> at all. (I heard that assigns will be deprecated in rails 5, but until then, is it ok to use the object directly?) Is it wrong to do this, for example:</p>
  
  <pre><code>assert_redirected_to(post_path(Post.first))
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>assert_redirected_to(post_path(assigns(:post))
  </code></pre>