Sha256: 8e5346af266683a9c48df05c0d05880fe07754581834503742dd4f618eb9838a

Contents?: true

Size: 617 Bytes

Versions: 23

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

# :markup: markdown

require "rails-dom-testing"
require "action_dispatch/testing/assertions/response"
require "action_dispatch/testing/assertions/routing"

module ActionDispatch
  module Assertions
    extend ActiveSupport::Concern

    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
        Rails::Dom::Testing.html_document.parse(@response.body)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
actionpack-8.0.1 lib/action_dispatch/testing/assertions.rb
actionpack-8.0.0.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.2.1 lib/action_dispatch/testing/assertions.rb
actionpack-8.0.0 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.2 lib/action_dispatch/testing/assertions.rb
actionpack-8.0.0.rc2 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.1.2 lib/action_dispatch/testing/assertions.rb
actionpack-8.0.0.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.1.1 lib/action_dispatch/testing/assertions.rb
actionpack-8.0.0.beta1 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha9 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha8 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha7 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha4 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha3 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha2 lib/action_dispatch/testing/assertions.rb
omg-actionpack-8.0.0.alpha1 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.0 lib/action_dispatch/testing/assertions.rb
actionpack-7.2.0.rc1 lib/action_dispatch/testing/assertions.rb