method

check_required_ivars

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: ActionController::TestCase::Behavior
check_required_ivars() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/test_case.rb, line 656
        def check_required_ivars
          # Check for required instance variables so we can give an
          # understandable error message.
          [:@routes, :@controller, :@request, :@response].each do |iv_name|
            if !instance_variable_defined?(iv_name) || instance_variable_get(iv_name).nil?
              raise "#{iv_name} is nil: make sure you set it in your test's setup method."
            end
          end
        end
Register or log in to add new notes.