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.8.7 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.8.6 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.8.5 lib/action_dispatch/testing/assertions.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.8.4/lib/action_dispatch/testing/assertions.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/testing/assertions.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/testing/assertions.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/testing/assertions.rb
actionpack-7.0.8.4 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.8.1 lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-7.0.2.3/lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-7.0.3.1/lib/action_dispatch/testing/assertions.rb
actionpack-7.0.8 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.7.2 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.7.1 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.7 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.6 lib/action_dispatch/testing/assertions.rb
actionpack-7.0.5.1 lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-7.0.2.3/lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-7.0.3.1/lib/action_dispatch/testing/assertions.rb
actionpack-7.0.5 lib/action_dispatch/testing/assertions.rb