Sha256: 197e1884adfe6c2fc0b581aa171c216d48459a4b2cfd17366d01f6a6c37235b9
Contents?: true
Size: 576 Bytes
Versions: 11
Compression:
Stored size: 576 Bytes
Contents
require 'test_helper' require 'peddler/parser' class TestPeddlerParser < MiniTest::Test def assert_parser(klass, *content_types) content_types.each do |content_type| res = OpenStruct.new(headers: { 'Content-Type' => content_type }, body: '') parser = Peddler::Parser.parse(res) assert_kind_of klass, parser end end def test_parses_xml assert_parser Peddler::XMLParser, 'text/xml', 'text/xml; charset=UTF-8' end def test_parses_flat_files assert_parser Peddler::FlatFileParser, 'text/plain', 'application/octet-stream' end end
Version data entries
11 entries across 11 versions & 1 rubygems