test/regression/test_outline02.rb in write_xlsx-0.85.5 vs test/regression/test_outline02.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_outline02
@xlsx = 'outline02.xlsx'
- workbook = WriteXLSX.new(@xlsx)
+ workbook = WriteXLSX.new(@io)
worksheet2 = workbook.add_worksheet('Collapsed Rows')
# Add a general format
bold = workbook.add_format(:bold => 1)
@@ -71,19 +71,17 @@
worksheet2.write('A12', 'Grand Total', bold)
worksheet2.write('B12', '=SUBTOTAL(9,B2:B10)', bold, 6400)
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