Sha256: a3a2e47efd484bd15068a1c7b2e716aabe07da22411d1ee2e2046a45008dd78d
Contents?: true
Size: 851 Bytes
Versions: 2
Compression:
Stored size: 851 Bytes
Contents
require File.dirname(__FILE__) + '/../spec_helper' require File.dirname(__FILE__) + '/../parser_helper' class HpricotTestResponse < Relax::Response class Token < Relax::Response parser :hpricot parameter :token_id, :element => :tokenid parameter :status end class Error < Relax::Response parser :hpricot parameter :code, :type => :integer parameter :message end parser :hpricot parameter :status, :required => true parameter :request_id, :element => :requestid, :type => :integer parameter :valid_request, :element => :requestid, :attribute => :valid parameter :tokens, :collection => Token parameter :error, :type => Error end describe 'an Hpricot parser' do before(:each) do @response = HpricotTestResponse.new(XML) end it_should_behave_like 'a successfully parsed response' end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
tylerhunt-relax-0.0.5 | spec/parsers/hpricot_spec.rb |
relax-0.0.5 | spec/parsers/hpricot_spec.rb |