# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx' require 'stringio' class TestWorksheet04 < Test::Unit::TestCase def setup @workbook = WriteXLSX.new(StringIO.new) @worksheet = @workbook.add_worksheet('') end def test_assemble_xml_file_set_row format = Writexlsx::Format.new(Writexlsx::Formats.new, :xf_index => 1, :bold => 1) @worksheet.select @worksheet.set_row(1, 30) @worksheet.set_row(3, nil, nil, 1) @worksheet.set_row(6, nil, format) @worksheet.set_row(9, 3) @worksheet.set_row(12, 24, nil, 1) @worksheet.set_row(14, 0) @worksheet.assemble_xml_file result = got_to_array(@worksheet.instance_variable_get(:@writer).string) expected = expected_to_array(< EOS ) assert_equal(expected, result) end end