title: After hook error in rspec
body: <pre><code>require 'spec_helper'
  
  describe StudentsController do
    fixtures :all
  
    context "#profile" do
      let(:school) { Factory.create(:school_2) }
  
      before do
        session[:email] = user.email
        session[:user_id] = user.id
      end
  
      it "should assign the user to @user" do
        User.stub(:find).with(user.id).and_return(user)
        get :profile
        assigns[:user].should eql(user)
      end
    end
  end
  </code></pre>
  
  <p>An error occurred in an after hook:</p>
  
  <pre><code>NoMethodError: undefined method `original_path_set' for nil:NilClass
  occurred at /home/qbadmin/.rvm/gems/ruby-1.9.3-p194/gems/rspec-rails-2.13.1/lib/rspec/rails/view_rendering.rb:121:in `block (2 levels) in &lt;module:ViewRendering&gt;'
  </code></pre>
  
  <p>This is the error I got when running <code>rspec spec</code> from the command line. Can anyone help me to figure out what the problem is?.</p>
  
  <p>The RSpec versions I have specified in the Gemfile are:</p>
  
  <pre><code>gem 'rspec', '~&gt; 2.13',
  gem 'rspec-rails', '~&gt; 2.13'
  </code></pre>
  
  <p>Thanks in advance.</p>