test/s3_commands_test.rb in shuck-0.0.2 vs test/s3_commands_test.rb in shuck-0.0.3
- old
+ new
@@ -45,9 +45,20 @@
output << chunk
end
assert_equal buf_len,output.size
end
+ def test_multi_directory
+ bucket = Bucket.create("mybucket")
+ S3Object.store("dir/myfile/123.txt","recursive","mybucket")
+
+ output = ""
+ obj = S3Object.stream("dir/myfile/123.txt","mybucket") do |chunk|
+ output << chunk
+ end
+ assert_equal "recursive", output
+ end
+
def test_find_nil_bucket
begin
bucket = Bucket.find("unknown")
assert_fail "Bucket.find didn't throw an exception"
rescue