instance method
check_required_ivars
Ruby on Rails 8.0.4
Since v4.0.13 PrivateSignature
check_required_ivars()
No documentation comment.
Source
# File actionpack/lib/action_controller/test_case.rb, line 685
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
Defined in actionpack/lib/action_controller/test_case.rb line 685
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::TestCase::Behavior