Sha256: 0692c18bc79852f6fb278c2dec4d6f5998ba624298ae8d764059cd855e29f33e

Contents?: true

Size: 639 Bytes

Versions: 37

Compression:

Stored size: 639 Bytes

Contents

# frozen_string_literal: true

require "rails-dom-testing"

module ActionDispatch
  module Assertions
    autoload :ResponseAssertions, "action_dispatch/testing/assertions/response"
    autoload :RoutingAssertions, "action_dispatch/testing/assertions/routing"

    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
        Nokogiri::HTML::Document.parse(@response.body)
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 4 rubygems

Version Path
actionpack-6.1.7.10 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.9 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.8 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.7 lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.5 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.4 lib/action_dispatch/testing/assertions.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.3 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.2 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.7 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.6.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.5.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.5 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.4.7 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.4.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.1.4.5 lib/action_dispatch/testing/assertions.rb