Skip to content

Commit

Permalink
And a test
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Jan 1, 2025
1 parent 5bb5d9b commit d6d7d0a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/xlsxtream/zip_kit_writer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6d7d0a

Please sign in to comment.