Sha256: 60999d052a047f4e952a517ed405a4f05f695fc4990a1d0a3bf9f61cc96e478e

Contents?: true

Size: 1.18 KB

Versions: 24

Compression:

Stored size: 1.18 KB

Contents

# encoding: utf-8

require File.dirname(__FILE__) + '/../../spec_helper'

describe Backup::Configuration::Storage::S3 do
  before do
    Backup::Configuration::Storage::S3.defaults do |s3|
      s3.access_key_id      = 'my_access_key_id'
      s3.secret_access_key  = 'my_secret_access_key'
      s3.region             = 'us-east-1'
      s3.bucket             = 'my-bucket'
      s3.path               = 'my_backups'
    end
  end

  it 'should set the default S3 configuration' do
    s3 = Backup::Configuration::Storage::S3
    s3.access_key_id.should     == 'my_access_key_id'
    s3.secret_access_key.should == 'my_secret_access_key'
    s3.region.should            == 'us-east-1'
    s3.bucket.should            == 'my-bucket'
    s3.path.should              == 'my_backups'
  end

  describe '#clear_defaults!' do
    it 'should clear all the defaults, resetting them to nil' do
      Backup::Configuration::Storage::S3.clear_defaults!

      s3 = Backup::Configuration::Storage::S3
      s3.access_key_id.should     == nil
      s3.secret_access_key.should == nil
      s3.region.should            == nil
      s3.bucket.should            == nil
      s3.path.should              == nil
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

Version Path
backup-3.0.19 spec/configuration/storage/s3_spec.rb
backup-3.0.18 spec/configuration/storage/s3_spec.rb
interu-backup-3.0.16 spec/configuration/storage/s3_spec.rb
backup-3.0.16 spec/configuration/storage/s3_spec.rb
backup-3.0.15 spec/configuration/storage/s3_spec.rb
backup-3.0.14 spec/configuration/storage/s3_spec.rb
backup-3.0.13 spec/configuration/storage/s3_spec.rb
backup-3.0.12 spec/configuration/storage/s3_spec.rb
backup-3.0.11 spec/configuration/storage/s3_spec.rb
alg-backup-3.0.10 spec/configuration/storage/s3_spec.rb
backup-3.0.10 spec/configuration/storage/s3_spec.rb
backup-3.0.9 spec/configuration/storage/s3_spec.rb
backup-3.0.8 spec/configuration/storage/s3_spec.rb
backup-3.0.7 spec/configuration/storage/s3_spec.rb
backup-3.0.6 spec/configuration/storage/s3_spec.rb
backup-3.0.5 spec/configuration/storage/s3_spec.rb
backup-3.0.4 spec/configuration/storage/s3_spec.rb
backup-3.0.3 spec/configuration/storage/s3_spec.rb
backup-3.0.2.build.0 spec/configuration/storage/s3_spec.rb
backup-3.0.2 spec/configuration/storage/s3_spec.rb