Sha256: 363f7646f58f0f369a51a53fa338d12405e5829a6f4ce75b3c8e512fc331610b
Contents?: true
Size: 462 Bytes
Versions: 5
Compression:
Stored size: 462 Bytes
Contents
require 'helper' require 'peddler/parser' class XMLParserTest < 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'}) @parser = Peddler::Parser.parse(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
5 entries across 5 versions & 1 rubygems