Sha256: 6aa310282283b06ca32db1b31a4b08a8f6ab1ad8959c4d68ed721a4f891531cd

Contents?: true

Size: 643 Bytes

Versions: 43

Compression:

Stored size: 643 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.to_s.end_with?("xml")
        Nokogiri::XML::Document.parse(@response.body)
      else
        Nokogiri::HTML::Document.parse(@response.body)
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 5 rubygems

Version Path
actionpack-6.0.6.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.5.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.5 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.8 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.7 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.5 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.4 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.3 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.2 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4.1 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.4 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.7 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.6 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.5 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.4 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.3 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.2 lib/action_dispatch/testing/assertions.rb
actionpack-6.0.3.1 lib/action_dispatch/testing/assertions.rb