title: Can't create users in rails when using authlogic because of cookies
body: <p>So, I have a standard rails 3 app with authlogic. If I'm not in the browser (in the console or in the test environment), I can't create user models.</p>
  
  <p>For example:</p>
  
  <p>I have this code either in a rspec test or in my console:</p>
  
  <pre><code>user = User.create(...user attributes...)
  </code></pre>
  
  <p>And I get this error:</p>
  
  <pre><code>NoMethodError: undefined method `cookies' for main:Object
  </code></pre>
  
  <p>I've looked all over the internet and can't figure this out. Any help would be greatly appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>So, I looked around some more and found in the documentation to do this:</p>
  
  <pre><code>include Authlogic::TestCase
  </code></pre>
  
  <p>but then I get this error:</p>
  
  <pre><code>uninitialized constant Authlogic::TestCase
  </code></pre>