method
process
v3.0.9 -
Show latest stable
-
0 notes -
Class: ActionController::TestCase::Behavior
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8
- 3.0.0 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2 (0)
- 4.1.8 (0)
- 4.2.1 (38)
- 4.2.7 (0)
- 4.2.9 (0)
- 5.0.0.1
- 5.1.7 (7)
- 5.2.3 (0)
- 6.0.0 (0)
- 6.1.3.1 (0)
- 6.1.7.7 (0)
- 7.0.0 (10)
- 7.1.3.2 (0)
- 7.1.3.4 (0)
- What's this?
process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET')
public
Hide source
# File actionpack/lib/action_controller/test_case.rb, line 383 def process(action, parameters = nil, session = nil, flash = nil, http_method = 'GET') # Sanity check for required instance variables so we can give an # understandable error message. %(@routes @controller @request @response).each do |iv_name| if !(instance_variable_names.include?(iv_name) || instance_variable_names.include?(iv_name.to_sym)) || instance_variable_get(iv_name).nil? raise "#{iv_name} is nil: make sure you set it in your test's setup method." end end @request.recycle! @response.recycle! @controller.response_body = nil @controller.formats = nil @controller.params = nil @html_document = nil @request.env['REQUEST_METHOD'] = http_method parameters ||= {} @request.assign_parameters(@routes, @controller.class.name.underscore.sub(/_controller$/, ''), action.to_s, parameters) @request.session = ActionController::TestSession.new(session) unless session.nil? @request.session["flash"] = @request.flash.update(flash || {}) @request.session["flash"].sweep @controller.request = @request @controller.params.merge!(parameters) build_request_uri(action, parameters) Base.class_eval { include Testing } @controller.process_with_new_base_test(@request, @response) @request.session.delete('flash') if @request.session['flash'].blank? @response end