module ActionController::TestCase::Behavior

def check_required_ivars

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