Sha256: 043e79cce3387f81d484e6b5ee519661697269f0b5c4b48bce86c41ce133e50d
Contents?: true
Size: 824 Bytes
Versions: 3
Compression:
Stored size: 824 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe XsdReader do let(:reader){ XsdReader::XML.new(:xsd_file => File.expand_path(File.join(File.dirname(__FILE__), 'examples', 'ddex-v36', 'ddex-ern-v36.xsd'))) } describe XsdReader::XML do it "gives a schema_node" do expect(reader.schema_node.name).to eq 'schema' expect(reader.schema_node.namespaces).to eq({"xmlns:xs"=>"http://www.w3.org/2001/XMLSchema", "xmlns:ern"=>"http://ddex.net/xml/ern/36", "xmlns:avs"=>"http://ddex.net/xml/avs/avs"}) end it "gives a schema reader" do expect(reader.schema.class).to eq XsdReader::Schema end it "gives an elements shortcut to its schema's shortcuts" do expect(reader.elements.map(&:name)).to eq reader.schema.elements.map(&:name) end end end # describe XsdReader
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
xsd-reader-0.3.0 | spec/xml_spec.rb |
xsd-reader-0.2.0 | spec/xml_spec.rb |
xsd-reader-0.1.0 | spec/xml_spec.rb |