Sha256: 88c97d5bce7484e5f899510860102011b9b8ac6ed96b265422a1e4c5b0d086c8
Contents?: true
Size: 569 Bytes
Versions: 3
Compression:
Stored size: 569 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
peddler-0.15.0 | test/unit/peddler/test_parser.rb |
peddler-0.14.0 | test/unit/peddler/test_parser.rb |
peddler-0.13.0 | test/unit/peddler/test_parser.rb |