Sha256: 82a1f908ddbf43d5aa87f12b501046a414d76097e7ba7f8e3719eeb7b1fe0436
Contents?: true
Size: 554 Bytes
Versions: 4
Compression:
Stored size: 554 Bytes
Contents
require 'helper' require 'peddler/xml_parser' class TestPeddlerXMLParser < MiniTest::Test def setup body = '<Response><Result><NextToken>123</NextToken><Foo>Bar</Foo></Result></Response>' res = OpenStruct.new(body: body, headers: { 'Content-Type' => 'text/xml', 'Content-Length' => '78'}) @parser = Peddler::XMLParser.new(res) end def test_parses_data assert_equal 'Bar', @parser.parse['Foo'] end def test_next_token assert_equal '123', @parser.next_token end def test_validates assert @parser.valid? end end
Version data entries
4 entries across 4 versions & 1 rubygems