1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# frozen_string_literal: true
require "minitest/autorun"
require "minitest/unit"
require "minitest/spec"
require "loofah"
require "loofah/helpers"
puts "=> testing with Nokogiri #{Nokogiri::VERSION_INFO.inspect}"
class Loofah::TestCase < MiniTest::Spec
class << self
alias_method :context, :describe
end
LOOFAH_HTML_DOCUMENT_CLASSES = if Loofah.html5_support?
[Loofah::HTML4::Document, Loofah::HTML5::Document]
else
[Loofah::HTML4::Document]
end
LOOFAH_HTML_DOCUMENT_FRAGMENT_CLASSES = if Loofah.html5_support?
[Loofah::HTML4::DocumentFragment, Loofah::HTML5::DocumentFragment]
else
[Loofah::HTML4::DocumentFragment]
end
LOOFAH_HTML_VERSIONS = if Loofah.html5_support?
[:html4, :html5]
else
[:html4]
end
end
|