Module: ActionDispatch::Assertions

Extended by:
ActiveSupport::Concern
Includes:
ResponseAssertions, RoutingAssertions, Rails::Dom::Testing::Assertions
Included in:
Integration::Runner, Integration::Session, ActionView::TestCase::Behavior
Defined in:
actionpack/lib/action_dispatch/testing/assertions.rb,
actionpack/lib/action_dispatch/testing/assertions/routing.rb,
actionpack/lib/action_dispatch/testing/assertions/response.rb

Defined Under Namespace

Modules: ResponseAssertions, RoutingAssertions

Instance Method Summary collapse

Methods included from ActiveSupport::Concern

append_features, class_methods, extended, included

Methods included from RoutingAssertions

#assert_generates, #assert_recognizes, #assert_routing, #method_missing, #with_routing

Methods included from ResponseAssertions

#assert_redirected_to, #assert_response

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActionDispatch::Assertions::RoutingAssertions

Instance Method Details

#html_documentObject



14
15
16
17
18
19
20
# File 'actionpack/lib/action_dispatch/testing/assertions.rb', line 14

def html_document
  @html_document ||= if @response.content_type =~ /xml$/
    Nokogiri::XML::Document.parse(@response.body)
  else
    Nokogiri::HTML::Document.parse(@response.body)
  end
end