Sha256: f5bdd264342d59f18d359a7d8208d3e93bb1f8f47cc8d4057d3ab3f46fe48adb
Contents?: true
Size: 880 Bytes
Versions: 3
Compression:
Stored size: 880 Bytes
Contents
require "spec_helper" describe PgbackupsArchive::Storage do let(:connection) { Fog::Storage.new(:provider => "AWS", :aws_access_key_id => "XXX", :aws_secret_access_key => "YYY") } let(:bucket) { connection.directories.create(:key => "someapp-backups") } let(:key) { "pgbackups/test/2012-08-02-12-00-00.dump" } let(:file) { "test" } let(:storage) { PgbackupsArchive::Storage.new(key, file) } before do Fog.mock! storage.stub(:connection).and_return(connection) storage.stub(:bucket).and_return(bucket) end it "should create a fog connection" do storage.connection.class.should eq Fog::Storage::AWS::Mock end it "should create a fog directory" do storage.bucket.class.should eq Fog::Storage::AWS::Directory end it "should create a fog file" do storage.store.class.should eq Fog::Storage::AWS::File end end
Version data entries
3 entries across 3 versions & 1 rubygems