123456789_123456789_123456789_123456789_123456789_

Module: ActionDispatch::IntegrationTest::Behavior

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Defined in: actionpack/lib/action_dispatch/testing/integration.rb

Constant Summary

::ActionDispatch::Assertions::ResponseAssertions - Included

RESPONSE_PREDICATES

::ActionDispatch::Integration::Runner - Included

APP_SESSIONS

Class Method Summary

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

append_features, prepend_features

Instance Attribute Summary

Instance Method Summary

::ActionDispatch::TestHelpers::PageDumpHelper - Included

#save_and_open_page

Saves the content of response body to a file and tries to open it in your browser.

#html_dump_default_path, #open_file, #save_page

::ActionController::TemplateAssertions - Included

::ActionDispatch::Integration::Runner - Included

#create_session, #initialize, #integration_session,
#open_session

Open a new session instance.

#reset!

Reset the current session.

#method_missing

Delegate unhandled messages to the current session instance.

#respond_to_missing?, #before_setup,
#copy_session_variables!

Copy the instance variables from the current session instance into the test instance.

#remove!

::ActionDispatch::Assertions - Included

::ActionDispatch::Assertions::RoutingAssertions - Included

#assert_generates

Asserts that the provided options can be used to generate the provided path.

#assert_recognizes

Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path.

#assert_routing

Asserts that path and options match both ways; in other words, it verifies that path generates options and then that options generates path.

#method_missing

ROUTES TODO: These assertions should really work in an integration context.

#with_routing

A helper to make it easier to test different route configurations.

#create_routes, #fail_on,
#recognized_request_for

Recognizes the route for a given path.

#reset_routes, #setup

::ActionDispatch::Assertions::ResponseAssertions - Included

#assert_redirected_to

Asserts that the response is a redirect to a URL matching the given options.

#assert_response

Asserts that the response is one of the following types:

#code_with_name, #generate_response_message, #location_if_redirected, #normalize_argument_to_redirection,
#parameterize

Proxy to to_param if the object will respond to it.

#response_body_if_short

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActionDispatch::Integration::Runner

DSL Calls

included

[ GitHub ]


657
658
659
660
661
662
663
# File 'actionpack/lib/action_dispatch/testing/integration.rb', line 657

included do
  include ActionDispatch::Routing::UrlFor
  include UrlOptions # don't let UrlFor override the url_options method
  include ActionDispatch::Assertions::RoutingAssertions::WithIntegrationRouting
  ActiveSupport.run_load_hooks(:action_dispatch_integration_test, self)
  @@app = nil
end

Instance Method Details

#app

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/testing/integration.rb', line 683

def app
  super || self.class.app
end

#document_root_element

[ GitHub ]

  
# File 'actionpack/lib/action_dispatch/testing/integration.rb', line 687

def document_root_element
  html_document.root
end