diff --git a/test/xlsxtream/zip_kit_writer_test.rb b/test/xlsxtream/zip_kit_writer_test.rb index a395393..9346e60 100644 --- a/test/xlsxtream/zip_kit_writer_test.rb +++ b/test/xlsxtream/zip_kit_writer_test.rb @@ -58,6 +58,15 @@ def test_with_output_to_creates_a_file_with_a_given_path end end + def test_with_output_to_converts_pathname_into_path + tf = Tempfile.new + assert tf.size == 0 + pathname = Pathname.new(tf.path) + writer = Xlsxtream::ZipKitWriter.with_output_to(pathname) + writer.close + assert tf.size > 0 + end + def test_with_output_to_writes_into_io io = StringIO.new writer = Xlsxtream::ZipKitWriter.with_output_to(io)