Module: ActionDispatch::Assertions
- Extended by:
- ActiveSupport::Concern
- Includes:
- ResponseAssertions, RoutingAssertions, Rails::Dom::Testing::Assertions
- Included in:
- Integration::Runner, Integration::Session
- Defined in:
- lib/action_dispatch/testing/assertions.rb,
lib/action_dispatch/testing/assertions/routing.rb,
lib/action_dispatch/testing/assertions/response.rb
Defined Under Namespace
Modules: ResponseAssertions, RoutingAssertions
Instance Method Summary collapse
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_document ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/action_dispatch/testing/assertions.rb', line 14 def html_document @html_document ||= if @response.content_type.to_s =~ /xml$/ Nokogiri::XML::Document.parse(@response.body) else Nokogiri::HTML::Document.parse(@response.body) end end |