# -*- coding: utf-8 -*- require 'helper' class TestComments02 < Minitest::Test def setup @workbook = WriteXLSX.new(StringIO.new) @worksheet = @workbook.add_worksheet('') end ############################################################################### # # Test the _assemble_xml_file() method. # def test_assemble_xml_file @worksheet.write_comment( 1, 1, 'Some text', :author => 'John', :visible => nil, :color => 81, :font => 'Calibri', :font_size => 20, :font_family => 2 ) comments = @worksheet.comments comments.assemble_xml_file result = got_to_array(comments.instance_variable_get(:@writer).string) expected = expected_to_array(expected_xml) assert_equal(expected, result) end def expected_xml < John Some text EOS end end