title: session undefined in rails ActionController::TestCase subclass
body: <p>My MacBook Pro died recently and I got a new one, restored all my files on it and came back to my rails app that I've been developing for quite some time.</p>
  
  <p>In there somewhere, I'd moved the directory where I kept the app (and the Aptana Studio 3 project, though I'm guessing that's not relevant).  The app now runs, but all of my functional tests crash, because it thinks the variable "session" is undefined.  Here's a boiled down version of my test case code:</p>
  
  <pre><code>require 'test_helper'
  
  class SkillsControllerTest &lt; ActionController::TestCase
  
  ...
  
     test "should not copy when current user does not have write permission" do
       session[:user] = users(:existingbob)
       assert_no_difference("Skill.count") do
         post :create, :campaign_id =&gt; 1, :skill_uri =&gt; {:campaign_id =&gt; 1, :skill_id =&gt; 1}
       end
       assert_redirected_to permissions_path()
     end
  ...
  end
  </code></pre>
  
  <p>I do a lot of this, my application check to see if users have permission for a particular action, and I have a lot of tests to check that it's working right.</p>
  
  <p>After my upheaval, the tests crash with the message:</p>
  
  <pre><code>/blah/blah/blah/skills_controller_test.rb:260:in`&lt;class:SkillsControllerTest&gt;': 
  undefined local variable or method `session' for SkillsControllerTest:Class (NameError)
  </code></pre>
  
  <p>This all used to work fine, and from what I can tell from the docs, it's still supposed to work just fine.  I think I'm misconfigured somehow, but frankly, I don't even know where to start looking.</p>
  
  <p>What's wrong?  Where should I look to see?</p>