Sha256: cf0ec7b5544366d783c2fccbd2aad4f81030932b1890a2014214ea6e789216a2
Contents?: true
Size: 984 Bytes
Versions: 3
Compression:
Stored size: 984 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe Medie::OpenSearch::Descriptor do context "unmarshalling one url documents" do before do xml = '<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Restbuy</ShortName> <Description>Restbuy search engine.</Description> <Tags>restbuy</Tags> <Contact>admin@restbuy.com</Contact> <Url type="application/atom+xml" template="http://localhost:3000/products?q={searchTerms}&pw={startPage?}&format=atom" /> <Url type="application/json" template="http://localhost:3000/products?q={searchTerms}&pw={startPage?}&format=json" /> </OpenSearchDescription>' @descriptor = Medie::OpenSearch::Driver.new.unmarshal(xml) end it "should unmarshall opensearch xml descriptions" do @descriptor.urls.size.should == 2 end end end
Version data entries
3 entries across 3 versions & 1 rubygems