Module ActionController::Rescue

  1. lib/spec/rails/extensions/action_controller/rescue.rb

Public instance methods

use_rails_error_handling! ()
[show source]
# File lib/spec/rails/extensions/action_controller/rescue.rb, line 3
    def use_rails_error_handling!
      Kernel.warn "DEPRECATION NOTICE: controller.use_rails_error_handling! is\ndeprecated and will be removed from a future version of\nrspec-rails.\n\nUse rescue_action_in_public!, which is defined directly in\nrails' testing framework, instead.\n"
      if Rails::VERSION::STRING =~ /^2\.0/
        @use_rails_error_handling = true
      else
        # anything but 0.0.0.0 - borrowed from rails own rescue_action_in_public!
        request.remote_addr = '208.77.188.166'
      end
    end
use_rails_error_handling? ()
[show source]
# File lib/spec/rails/extensions/action_controller/rescue.rb, line 21
    def use_rails_error_handling?
      @use_rails_error_handling ||= false
    end

Protected instance methods

rescue_action_in_public? ()
[show source]
# File lib/spec/rails/extensions/action_controller/rescue.rb, line 28
      def rescue_action_in_public?
        request.respond_to?(:rescue_action_in_public?) and request.rescue_action_in_public?
      end
rescue_action_with_handler_with_fast_errors (exception)
[show source]
# File lib/spec/rails/extensions/action_controller/rescue.rb, line 32
      def rescue_action_with_handler_with_fast_errors(exception)
        if (use_rails_error_handling? || rescue_action_in_public?) & !handler_for_rescue(exception)
          rescue_action_in_public(exception)
        else
          rescue_action_with_handler_without_fast_errors(exception)
        end
      end