# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx' require 'stringio' class TestTable01 < Minitest::Test def setup workbook = WriteXLSX.new(StringIO.new) @worksheet = workbook.add_worksheet end def test_table01 # Set the table properties. @worksheet.add_table('C3:F13') table = @worksheet.tables[0] @worksheet.__send__(:prepare_tables, 1, {}) table.__send__(:assemble_xml_file) result = got_to_array(table.instance_variable_get(:@writer).string) assert_equal(expected, result) end def expected expected_to_array( <
EOS ) end end