# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/package/core' class TestCore02 < Test::Unit::TestCase def test_assemble_xml_file properties = { :title => 'This is an example spreadsheet', :subject => 'With document properties', :author => 'John McNamara', :manager => 'Dr. Heinz Doofenshmirtz', :company => 'of Wolves', :category => 'Example spreadsheets', :keywords => 'Sample, Example, Properties', :comments => 'Created with Ruby and WriteXLSX', :status => 'Quo', :created => Time.local(2011, 4, 6, 19, 45, 15) } @obj = Writexlsx::Package::Core.new @obj.set_properties(properties) @obj.assemble_xml_file result = got_to_array(@obj.xml_str) expected = expected_to_array(< This is an example spreadsheet With document properties John McNamara Sample, Example, Properties Created with Ruby and WriteXLSX John McNamara 2011-04-06T19:45:15Z 2011-04-06T19:45:15Z Example spreadsheets Quo EOS ) assert_equal(expected, result) end end