Sha256: 1d0e5cebcf79703ba9eb68d47bd1c22a956a4a9648e4b88dcbc2ecd8a700546f
Contents?: true
Size: 552 Bytes
Versions: 38
Compression:
Stored size: 552 Bytes
Contents
# frozen_string_literal: true require "rails-dom-testing" require "action_dispatch/testing/assertions/response" require "action_dispatch/testing/assertions/routing" module ActionDispatch module Assertions include ResponseAssertions include RoutingAssertions include Rails::Dom::Testing::Assertions def html_document @html_document ||= if @response.media_type&.end_with?("xml") Nokogiri::XML::Document.parse(@response.body) else Nokogiri::HTML::Document.parse(@response.body) end end end end
Version data entries
38 entries across 36 versions & 4 rubygems