Sha256: 60bbfe8459fa375ae00b9b5c393bd1c96249e1141ce3cbbb3248739ffb7690da

Contents?: true

Size: 941 Bytes

Versions: 5

Compression:

Stored size: 941 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx/package/table'

class TestTableWriteTableStyleInfo < Test::Unit::TestCase
  def test_table_write_table_style_info
    expected = '<tableStyleInfo name="TableStyleMedium9" showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>'

    table = Writexlsx::Package::Table.new
    table.
      instance_variable_set(:@properties,
                            {
                              :_style            => 'TableStyleMedium9',
                              :_show_first_col   => 0,
                              :_show_last_col    => 0,
                              :_show_row_stripes => 1,
                              :_show_col_stripes => 0
                            }
                            )
    table.__send__(:write_table_style_info)
    result = table.instance_variable_get(:@writer).string

    assert_equal(expected, result)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
write_xlsx-0.58.0 test/package/table/test_write_table_style_info.rb
write_xlsx-0.57.0 test/package/table/test_write_table_style_info.rb
write_xlsx-0.56.0 test/package/table/test_write_table_style_info.rb
write_xlsx-0.55.0 test/package/table/test_write_table_style_info.rb
write_xlsx-0.54.0 test/package/table/test_write_table_style_info.rb