Sha256: b1060cf8157b5df366b15ec10228d70f9cd640b9e5c75916b6ffcb0e4d61239a

Contents?: true

Size: 1.52 KB

Versions: 19

Compression:

Stored size: 1.52 KB

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx'
require 'stringio'

class TestStyles01 < Minitest::Test
  def test_styles_01
    workbook = WriteXLSX.new(StringIO.new)
    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
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <fonts count="1">
    <font>
      <sz val="11"/>
      <color theme="1"/>
      <name val="Calibri"/>
      <family val="2"/>
      <scheme val="minor"/>
    </font>
  </fonts>
  <fills count="2">
    <fill>
      <patternFill patternType="none"/>
    </fill>
    <fill>
      <patternFill patternType="gray125"/>
    </fill>
  </fills>
  <borders count="1">
    <border>
      <left/>
      <right/>
      <top/>
      <bottom/>
      <diagonal/>
    </border>
  </borders>
  <cellStyleXfs count="1">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
  </cellStyleXfs>
  <cellXfs count="1">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>
  </cellXfs>
  <cellStyles count="1">
    <cellStyle name="Normal" xfId="0" builtinId="0"/>
  </cellStyles>
  <dxfs count="0"/>
  <tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleLight16"/>
</styleSheet>
EOS
      )
    assert_equal(expected, result)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
write_xlsx-1.09.4 test/package/styles/test_styles_01.rb
write_xlsx-1.09.3 test/package/styles/test_styles_01.rb
write_xlsx-1.09.2 test/package/styles/test_styles_01.rb
write_xlsx-1.09.1 test/package/styles/test_styles_01.rb
write_xlsx-1.09.0 test/package/styles/test_styles_01.rb
write_xlsx-1.08.2 test/package/styles/test_styles_01.rb
write_xlsx-1.08.1 test/package/styles/test_styles_01.rb
write_xlsx-1.08.0 test/package/styles/test_styles_01.rb
write_xlsx-1.07.0 test/package/styles/test_styles_01.rb
write_xlsx-1.04.0 test/package/styles/test_styles_01.rb
write_xlsx-1.02.0 test/package/styles/test_styles_01.rb
write_xlsx-1.01.0 test/package/styles/test_styles_01.rb
write_xlsx-1.00.0 test/package/styles/test_styles_01.rb
write_xlsx-0.99.0 test/package/styles/test_styles_01.rb
write_xlsx-0.97.0 test/package/styles/test_styles_01.rb
write_xlsx-0.90.0 test/package/styles/test_styles_01.rb
write_xlsx-0.89.0 test/package/styles/test_styles_01.rb
write_xlsx-0.88.0 test/package/styles/test_styles_01.rb
write_xlsx-0.87.0 test/package/styles/test_styles_01.rb