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

Version Path
actionpack-7.0.4.3 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.4.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.4.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.4 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.3.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.3 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.2.4 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.2.3 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.2.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.2.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0.rc3 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0.rc2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0.alpha2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.0.alpha1 lib/action_dispatch/testing/assertions.rb