Module: ActionController::TestProcess

Module | ActionController::TestProcess
In: | lib/action_controller/test_process.rb

### Methods

assigns build_request_uri cookies find_all_tag find_tag fixture_file_upload flash follow_redirect html_document included method_missing process redirect_to_url session with_routing xhr xml_http_request

### Public Class methods

included(base)

### Public Instance methods

assigns(key = nil)
build_request_uri(action, parameters)
cookies()
find_all_tag(conditions)
find_tag(conditions)
fixture_file_upload(path, mime_type = nil)

Shortcut for ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + path, type). Example:

      post :change_avatar, :avatar => fixture_file_upload('/files/spongebob.png', 'image/png')

flash()
follow_redirect()
html_document()
method_missing(selector, *args)
process(action, parameters = nil, session = nil, flash = nil)

execute the request and set/volley the response

redirect_to_url()
session()
with_routing() {|temporary_routes| ...}

A helper to make it easier to test different route configurations. This method temporarily replaces ActionController::Routing::Routes with a new RouteSet instance.

The new instance is yielded to the passed block. Typically the block will create some routes using map.draw { map.connect … }:

      with_routing do |set|
        set.draw { set.connect ':controller/:id/:action' }
        assert_equal(
           ['/content/10/show', {}],
           set.generate(:controller => 'content', :id => 10, :action => 'show')
        )
      end

xhr(request_method, action, parameters = nil, session = nil, flash = nil)

Alias for xml_http_request

xml_http_request(request_method, action, parameters = nil, session = nil, flash = nil)

[Validate]