test/test_23_note.rb in writeexcel-0.6.18 vs test/test_23_note.rb in writeexcel-0.6.19
- old
+ new
@@ -19,9 +19,18 @@
def setup
@workbook = WriteExcel.new(StringIO.new)
@worksheet = @workbook.add_worksheet
end
+ def teardown
+ if @workbook.instance_variable_get(:@filehandle)
+ @workbook.instance_variable_get(:@filehandle).close(true)
+ end
+ if @worksheet.instance_variable_get(:@filehandle)
+ @worksheet.instance_variable_get(:@filehandle).close(true)
+ end
+ end
+
def test_blank_author_name
comment = Writeexcel::Worksheet::Comment.new(@worksheet, 2, 0, 'Test')
obj_id = 1
caption = sprintf(" \tnote_record")