Sha256: 16decba38b67239b1d1dedd6f62a06e0130ad7f2324eeb6842dc4bd9f97c8c60

Contents?: true

Size: 1.5 KB

Versions: 11

Compression:

Stored size: 1.5 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Syncer::S3 do
  before do
    Backup::Configuration::Syncer::S3.defaults do |s3|
      s3.access_key_id       = 'my_access_key_id'
      s3.secret_access_key   = 'my_secret_access_key'
      s3.bucket              = 'my-bucket'
      s3.path                = '/backups/'
      s3.directories         = '/directories/to/backup/'
      s3.mirror              = true
      s3.additional_options  = ['--exclude="*.rb"']
    end
  end

  it 'should set the default s3 configuration' do
    s3 = Backup::Configuration::Syncer::S3
    s3.access_key_id.should       == 'my_access_key_id'
    s3.secret_access_key.should   == 'my_secret_access_key'
    s3.bucket.should              == 'my-bucket'
    s3.path.should                == '/backups/'
    s3.directories.should         == '/directories/to/backup/'
    s3.mirror.should              == true
    s3.additional_options.should  == ['--exclude="*.rb"']
  end

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

      s3 = Backup::Configuration::Syncer::S3
      s3.access_key_id.should       == nil
      s3.secret_access_key.should   == nil
      s3.bucket.should              == nil
      s3.path.should                == nil
      s3.directories.should         == nil
      s3.mirror.should              == nil
      s3.additional_options.should  == nil
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
backup-3.0.19 spec/configuration/syncer/s3_spec.rb
backup-3.0.18 spec/configuration/syncer/s3_spec.rb
interu-backup-3.0.16 spec/configuration/syncer/s3_spec.rb
backup-3.0.16 spec/configuration/syncer/s3_spec.rb
backup-3.0.15 spec/configuration/syncer/s3_spec.rb
backup-3.0.14 spec/configuration/syncer/s3_spec.rb
backup-3.0.13 spec/configuration/syncer/s3_spec.rb
backup-3.0.12 spec/configuration/syncer/s3_spec.rb
backup-3.0.11 spec/configuration/syncer/s3_spec.rb
alg-backup-3.0.10 spec/configuration/syncer/s3_spec.rb
backup-3.0.10 spec/configuration/syncer/s3_spec.rb