# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx/workbook' require 'write_xlsx/worksheet' require 'stringio' class TestWriteRow < Test::Unit::TestCase def setup @workbook = WriteXLSX.new(StringIO.new) @worksheet = @workbook.add_worksheet('') end def test_write_row_0 @worksheet.__send__('write_row_element', 0) result = @worksheet.instance_variable_get(:@writer).string expected = '' assert_equal(expected, result) end def test_write_row_2_22 @worksheet.__send__('write_row_element', 2, '2:2') result = @worksheet.instance_variable_get(:@writer).string expected = '' assert_equal(expected, result) end def test_write_row_1_nil_30 @worksheet.__send__('write_row_element', 1, nil, 30) result = @worksheet.instance_variable_get(:@writer).string expected = '' assert_equal(expected, result) end def test_write_row_3_nil_nil_nil_1 @worksheet.__send__('write_row_element', 3, nil, nil, nil, 1) result = @worksheet.instance_variable_get(:@writer).string expected = '