Sha256: d9e70b3f9858f9a73e1ca0063a4ce51beeab749d4fb7ebb9ec7f8e521de06c88
Contents?: true
Size: 973 Bytes
Versions: 6
Compression:
Stored size: 973 Bytes
Contents
require "spec_helper" describe Wasabi::Parser do context "with: multiple_namespaces.wsdl" do subject do parser = Wasabi::Parser.new Nokogiri::XML(xml) parser.parse parser end let(:xml) { fixture(:multiple_namespaces).read } it "lists the types" do subject.types.keys.sort.should == ["Article", "Save"] end it "records the namespace for each type" do subject.types["Save"][:namespace].should == "http://example.com/actions" end it "records the fields under a type" do subject.types["Save"].keys.should =~ ["article", :namespace] end it "records multiple fields when there are more than one" do subject.types["Article"].keys.should =~ ["Title", "Author", :namespace] end it "records the type of a field" do subject.types["Save"]["article"][:type].should == "article:Article" subject.namespaces["article"].should == "http://example.com/article" end end end
Version data entries
6 entries across 6 versions & 1 rubygems