module Admin
  class ApplicationController < ActionController::Base

    def current_user
      $mocked_user
    end
    helper_method :current_user

    def index
    end
  end
end

module Admin
  class ApplicationController < ActionController::Base

    if Rails.env.test?
      def current_user
        $mocked_user
      end
      helper_method :current_user
    end

    def index
    end
  end
end

Save original requested path before redirecting to sign-in
Save original requested path before redirecting to sign-in
