# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/workbook' require 'write_xlsx/package/styles' require 'stringio' class TestStyles09 < Test::Unit::TestCase def test_styles_09 workbook = WriteXLSX.new(StringIO.new) format1 = workbook.add_format( :color => '#9C0006', :bg_color => '#FFC7CE', :font_condense => 1, :font_extend => 1, :has_fill => 1, :has_font => 1 ) format1.get_dxf_index workbook.__send__('prepare_format_properties') @style = Writexlsx::Package::Styles.new @style.set_style_properties(*workbook.style_properties) @style.assemble_xml_file result = got_to_array(@style.xml_str) expected = expected_to_array(< EOS ) assert_equal(expected, result) end end