Sha256: 0ab09f98446496debe056a06f722f21088dc987c370ff30a02721089d890cbc3

Contents?: true

Size: 614 Bytes

Versions: 20

Compression:

Stored size: 614 Bytes

Contents

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.content_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

20 entries across 20 versions & 1 rubygems

Version Path
actionpack-5.1.7 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.7.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.6.2 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.6.1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.6 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.5 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.5.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.4 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.4.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.3 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.3.rc3 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.3.rc2 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.3.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.2 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.2.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.0 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.0.rc2 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.0.rc1 lib/action_dispatch/testing/assertions.rb
actionpack-5.1.0.beta1 lib/action_dispatch/testing/assertions.rb