Sha256: 258efa5c131e96c56e67735268dc2337f9488ff6ceddcb16c1c676b16fb7ecfb
Contents?: true
Size: 559 Bytes
Versions: 6
Compression:
Stored size: 559 Bytes
Contents
require 'helper' require 'peddler/xml_response_parser' class TestPeddlerXMLResponseParser < 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::XMLResponseParser.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 end
Version data entries
6 entries across 6 versions & 1 rubygems