title: NoMethodError: undefined method `original_path_set' for nil:NilClass
body: <p>I tried to test my Rails application with Travis CI and got this errors in my controller tests:</p>
  
  <pre><code>DaysController
  
      GET 'index'
  
  An error occurred in an after hook
  
      NoMethodError: undefined method `original_path_set' for nil:NilClass
  
      occurred at /home/travis/build/violarium/ruby-moon/vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.14.2/lib/rspec/rails/view_rendering.rb:121:in `block (2 levels) in &lt;module:ViewRendering&gt;'
  </code></pre>
  
  <p>The problem is, that same test locally passing successfully.</p>
  
  <p>In this example DaysController is a simple controller with concern - module with some authentication methods:</p>
  
  <pre><code>module UserSession
    extend ActiveSupport::Concern
  
    private
  
    # Sign in existent user
    def sign_in(user)
      cookies.permanent[:remember_token] = user.remember_token
    end
  
    # Clear cookies
    def sign_out
      cookies[:remember_token] = nil
    end
  
    # Get current signed in user or nil
    def signed_in_user
      @current_user ||= User.find_by(remember_token: cookies[:remember_token])
    end
  
    # Check if user is signed in
    def signed_in?
      !signed_in_user.nil?
    end
  
    included do
      helper_method :signed_in?
    end
  end
  </code></pre>