spec/outputs/s3_spec.rb in logstash-output-s3-0.1.4 vs spec/outputs/s3_spec.rb in logstash-output-s3-0.1.5
- old
+ new
@@ -49,10 +49,11 @@
s3 = LogStash::Outputs::S3.new(config)
allow(s3).to receive(:test_s3_write)
s3.register
expect(Dir.exist?(temporary_directory)).to eq(true)
+ s3.teardown
FileUtils.rm_r(temporary_directory)
end
it "should raise a ConfigurationError if the prefix contains one or more '\^`><' characters" do
config = {
@@ -90,13 +91,9 @@
expect(s3.get_temporary_filename).to eq("ls.s3.logstash.local.2015-01-01T00.00.part0.txt")
end
end
describe "#write_on_bucket" do
- after(:all) do
- File.unlink(fake_data.path)
- end
-
let!(:fake_data) { Stud::Temporary.file }
let(:fake_bucket) do
s3 = double('S3Object')
s3.stub(:write)