Sha256: 4b31d8df90b2483b3ea19cd0ba92a04e94f860e27712aeeb55aacadb80821fb2

Contents?: true

Size: 596 Bytes

Versions: 16

Compression:

Stored size: 596 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
    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

16 entries across 16 versions & 3 rubygems

Version Path
actionpack-7.1.5 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.4.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.4.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.4 lib/action_dispatch/testing/assertions.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionpack-7.1.3.4/lib/action_dispatch/testing/assertions.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/actionpack-7.1.3.4/lib/action_dispatch/testing/assertions.rb
actionpack-7.1.3.4 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.3.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.3.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.3 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.0 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.0.rc2 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.0.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-7.1.0.beta1 lib/action_dispatch/testing/assertions.rb