test/regression/test_escapes01.rb in write_xlsx-0.85.5 vs test/regression/test_escapes01.rb in write_xlsx-0.85.6
- old
+ new
@@ -5,16 +5,16 @@
def setup
setup_dir_var
end
def teardown
- File.delete(@xlsx) if File.exist?(@xlsx)
+ @tempfile.close(true)
end
def test_escapes01
@xlsx = 'escapes01.xlsx'
- workbook = WriteXLSX.new(@xlsx)
+ workbook = WriteXLSX.new(@io)
worksheet = workbook.add_worksheet('5&4')
worksheet.write_formula('A1', %q{=IF(1>2,0,1)}, nil, 1)
worksheet.write_formula('A2', %q{=CONCATENATE("'","<>&")}, nil, %q{'<>&})
worksheet.write_formula('A3', %q{=1&"b"}, nil, %q{1b})
@@ -23,15 +23,13 @@
worksheet.write_formula('A6', %q{="&" & "&"}, nil, %q{&&})
worksheet.write_string('A8', %q{"&<>})
workbook.close
- compare_xlsx_for_regression(
- File.join(@regression_output, @xlsx),
- @xlsx,
- [ 'xl/calcChain.xml', '[Content_Types].xml', 'xl/_rels/workbook.xml.rels' ],
- {
- 'xl/workbook.xml' => ['<workbookView']
- }
- )
+ compare_for_regression(
+ [ 'xl/calcChain.xml', '[Content_Types].xml', 'xl/_rels/workbook.xml.rels' ],
+ {
+ 'xl/workbook.xml' => ['<workbookView']
+ }
+ )
end
end