Sha256: 9d9e452bff13997f7dc11c382edf9f397dbc9597866c965989d5ad33c481a18b
Contents?: true
Size: 665 Bytes
Versions: 6
Compression:
Stored size: 665 Bytes
Contents
require '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.new(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
6 entries across 6 versions & 1 rubygems