Sha256: 893de7794457399dc8dc87525eb2594b981acf1206b12e16f181de15b6bfa088
Contents?: true
Size: 1.16 KB
Versions: 13
Compression:
Stored size: 1.16 KB
Contents
module Adhoq RSpec.describe Storage, type: :model do describe Storage::LocalFile do tempdir = __dir__ + '/../../tmp/adhoq_storage.test' after(:all) do FileUtils.rm_rf(tempdir) end let(:storage) { Storage::LocalFile.new(tempdir) } let(:identifier) do storage.store('.txt') { StringIO.new("Hello adhoq!\n") } end specify { expect(storage.get(identifier)).to eq "Hello adhoq!\n" } end describe Storage::S3, :fog_mock do let(:storage) { Storage::S3.new('my-adhoq-bucket', aws_access_key_id: 'key_id', aws_secret_access_key: 'access_key') } let(:identifier) do storage.store('.txt') { StringIO.new("Hello adhoq!\n") } end specify { expect(storage.get(identifier)).to eq "Hello adhoq!\n" } end describe Storage::OnTheFly do let(:storage) { Storage::OnTheFly.new } let!(:identifier) do storage.store('.txt') { StringIO.new("Hello adhoq!\n") } end specify { expect(storage.get(identifier)).to eq "Hello adhoq!\n" } specify do expect { storage.get(identifier) }.to change { storage.reports.size }.by(-1) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems