Sha256: 1d4aa229e59b922a5534b2c3a551cd873faa44ba0dc55169e62985ca384a16c3

Contents?: true

Size: 1.28 KB

Versions: 12

Compression:

Stored size: 1.28 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Storage::Dropbox do
  before do
    Backup::Configuration::Storage::Dropbox.defaults do |db|
      db.email       = 'my@email.com'
      db.password    = 'my_password'
      db.api_key     = 'my_api_key'
      db.api_secret  = 'my_secret'
      db.path        = 'my_backups'
      db.keep        = 20
      db.timeout     = 500
    end
  end

  it 'should set the default Dropbox configuration' do
    db = Backup::Configuration::Storage::Dropbox
    db.email.should       == 'my@email.com'
    db.password.should    == 'my_password'
    db.api_key.should     == 'my_api_key'
    db.api_secret.should  == 'my_secret'
    db.path.should        == 'my_backups'
    db.keep.should        == 20
    db.timeout.should     == 500
  end

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

      db = Backup::Configuration::Storage::Dropbox
      db.email.should       == nil
      db.password.should    == nil
      db.api_key.should     == nil
      db.api_secret.should  == nil
      db.path.should        == nil
      db.keep.should        == nil
      db.timeout.should     == nil
    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
interu-backup-3.0.16 spec/configuration/storage/dropbox_spec.rb
backup-3.0.16 spec/configuration/storage/dropbox_spec.rb
backup-3.0.15 spec/configuration/storage/dropbox_spec.rb
backup-3.0.14 spec/configuration/storage/dropbox_spec.rb
backup-3.0.13 spec/configuration/storage/dropbox_spec.rb
backup-3.0.12 spec/configuration/storage/dropbox_spec.rb
backup-3.0.11 spec/configuration/storage/dropbox_spec.rb
alg-backup-3.0.10 spec/configuration/storage/dropbox_spec.rb
backup-3.0.10 spec/configuration/storage/dropbox_spec.rb
backup-3.0.9 spec/configuration/storage/dropbox_spec.rb
backup-3.0.8 spec/configuration/storage/dropbox_spec.rb
backup-3.0.7 spec/configuration/storage/dropbox_spec.rb