title: RSpec: undefined local variable or method `activate_authlogic'
body: <p>My <code>_spec</code> file includes the code below, but my test fails with:</p>
  
  <pre><code>NameError in 'MembershipsController should allow you to save updates to the notes'
  undefined local variable or method `activate_authlogic' for #&lt;Spec::Rails::Example::ControllerExampleGroup::Subclass_1:0x107cee930&gt;
  </code></pre>
  
  <p>I don't understand why <code>activate_authlogic</code> is undefined in this case. I've used this line in TestUnit many times, and the RSpec examples I've read all seem to say that this should work. <strong>NOTE:</strong> I've also tried adding <code>require 'authlogic'</code> to the top of the <code>_spec</code> file, but it produces an identical error message.</p>
  
  <pre><code>require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
  require 'ruby-debug'
  
  describe MembershipsController do
  
    before(:each) do
      activate_authlogic
      @admin = Factory(:admin, :email =&gt; "admin@example.com")
      UserSession.create(@admin)
    end
  
    ...
  
  end
  </code></pre>