From 0584c5d628f34b5d2edb2a075774e0d457423bd2 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 6 Aug 2016 12:55:52 -0400 Subject: add variants --- spec/zip_spec.cr | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/zip_spec.cr b/spec/zip_spec.cr index 74066b7..0ace290 100644 --- a/spec/zip_spec.cr +++ b/spec/zip_spec.cr @@ -1,5 +1,7 @@ require "./spec_helper" +TEST_DIR = File.dirname(__FILE__) + describe Zip do # TODO: Write tests @@ -9,7 +11,9 @@ describe Zip do end describe Zip::Writer do - Zip.write("test.zip") do |zip| + Zip.write(File.join(TEST_DIR, "test.zip")) do |zip| zip.add("foo.txt", MemoryIO.new("foo")) + zip.add("bar.txt", "bar") + zip.add_file("shard.yml", File.join(TEST_DIR, "..", "shard.yml")) end end -- cgit v1.2.3