Sha256: efcd81f41e5373fbf20e950b77ff77b5f82f8fc24650086001ec8825858c22c1

Contents?: true

Size: 618 Bytes

Versions: 19

Compression:

Stored size: 618 Bytes

Contents

require 'tc_helper.rb'

class TestRelationships < Test::Unit::TestCase

  def test_valid_document
    @rels = Axlsx::Relationships.new
    schema = Nokogiri::XML::Schema(File.open(Axlsx::RELS_XSD))
    doc = Nokogiri::XML(@rels.to_xml_string)
    errors = []
    schema.validate(doc).each do |error|
      puts error.message
      errors << error
    end

    @rels << Axlsx::Relationship.new(Axlsx::WORKSHEET_R, "bar")
    doc = Nokogiri::XML(@rels.to_xml_string)
    errors = []
    schema.validate(doc).each do |error|
      puts error.message
      errors << error
    end

    assert(errors.size == 0)
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
axlsx-1.3.6 test/rels/tc_relationships.rb
axlsx-1.3.5 test/rels/tc_relationships.rb
axlsx-1.3.4 test/rels/tc_relationships.rb
axlsx-1.3.3 test/rels/tc_relationships.rb
axlsx-1.3.2 test/rels/tc_relationships.rb
axlsx-1.3.1 test/rels/tc_relationships.rb
axlsx-1.2.3 test/rels/tc_relationships.rb
axlsx-1.2.2 test/rels/tc_relationships.rb
axlsx-1.2.1 test/rels/tc_relationships.rb
axlsx-1.2.0 test/rels/tc_relationships.rb
axlsx-1.1.8 test/rels/tc_relationships.rb
axlsx-1.1.7 test/rels/tc_relationships.rb
axlsx-1.1.6 test/rels/tc_relationships.rb
axlsx-1.1.5 test/rels/tc_relationships.rb
axlsx-1.1.4 test/rels/tc_relationships.rb
axlsx-1.1.3 test/rels/tc_relationships.rb
axlsx-1.1.2 test/rels/tc_relationships.rb
axlsx-1.1.1 test/rels/tc_relationships.rb
axlsx-1.1.0 test/rels/tc_relationships.rb