Sha256: bf72d6f37cfc637630af610c06eb664e42e3601f7be843e83243f2c2478afa83
Contents?: true
Size: 1.2 KB
Versions: 18
Compression:
Stored size: 1.2 KB
Contents
# -*- coding: utf-8 -*- require 'helper' require 'write_xlsx' require 'stringio' class TestWriteCalcPr < Test::Unit::TestCase def setup @workbook = WriteXLSX.new(StringIO.new) end def test_write_calc_pr @workbook.__send__('write_calc_pr') result = @workbook.xml_str expected = '<calcPr calcId="124519" fullCalcOnLoad="1"/>' assert_equal(expected, result) end def test_write_calc_pr_with_auto_except_tables_mode @workbook.set_calc_mode('auto_except_tables') @workbook.__send__('write_calc_pr') result = @workbook.xml_str expected = '<calcPr calcId="124519" calcMode="autoNoTable" fullCalcOnLoad="1"/>' assert_equal(expected, result) end def test_write_calc_pr_with_manual_mode @workbook.set_calc_mode('manual') @workbook.__send__('write_calc_pr') result = @workbook.xml_str expected = '<calcPr calcId="124519" calcMode="manual" calcOnSave="0"/>' assert_equal(expected, result) end def test_write_calc_pr_with_non_default_calc_id @workbook.set_calc_mode('auto', 12345) @workbook.__send__('write_calc_pr') result = @workbook.xml_str expected = '<calcPr calcId="12345" fullCalcOnLoad="1"/>' assert_equal(expected, result) end end
Version data entries
18 entries across 18 versions & 1 rubygems