# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/package/relationships' class TestRelationships < Test::Unit::TestCase def test_assemble_xml_file @obj = Writexlsx::Package::Relationships.new @obj.add_document_relationship('/worksheet', 'worksheets/sheet1.xml') @obj.add_document_relationship('/theme', 'theme/theme1.xml') @obj.add_document_relationship('/styles', 'styles.xml') @obj.add_document_relationship('/sharedStrings', 'sharedStrings.xml') @obj.add_document_relationship('/calcChain', 'calcChain.xml') @obj.assemble_xml_file result = got_to_array(@obj.xml_str) expected = expected_to_array(< EOS ) assert_equal(expected, result) end end