Sha256: 565267e347e7000c606c79b3b86c8bff4dbdd1ca2f2962c11644e3e80941a4fd

Contents?: true

Size: 1.07 KB

Versions: 19

Compression:

Stored size: 1.07 KB

Contents

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

class TestWorksheet02 < Minitest::Test
  def setup
    @workbook = WriteXLSX.new(StringIO.new)
    @worksheet = @workbook.add_worksheet('')
  end

  def test_assemble_xml_file_write
    @worksheet.select
    @worksheet.write('B3', 123)
    @worksheet.assemble_xml_file
    result = got_to_array(@worksheet.instance_variable_get(:@writer).string)
    expected = expected_to_array(<<EOS
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
  <dimension ref="B3"/>
  <sheetViews>
    <sheetView tabSelected="1" workbookViewId="0"/>
  </sheetViews>
  <sheetFormatPr defaultRowHeight="15"/>
  <sheetData>
    <row r="3" spans="2:2">
      <c r="B3">
        <v>123</v>
      </c>
    </row>
  </sheetData>
  <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
</worksheet>
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/worksheet/test_worksheet_02.rb
write_xlsx-1.09.3 test/worksheet/test_worksheet_02.rb
write_xlsx-1.09.2 test/worksheet/test_worksheet_02.rb
write_xlsx-1.09.1 test/worksheet/test_worksheet_02.rb
write_xlsx-1.09.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.08.2 test/worksheet/test_worksheet_02.rb
write_xlsx-1.08.1 test/worksheet/test_worksheet_02.rb
write_xlsx-1.08.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.07.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.04.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.02.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.01.0 test/worksheet/test_worksheet_02.rb
write_xlsx-1.00.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.99.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.97.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.90.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.89.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.88.0 test/worksheet/test_worksheet_02.rb
write_xlsx-0.87.0 test/worksheet/test_worksheet_02.rb