Sha256: 0ec4c734da194c313f3e79891d7c28e7dc46cefffd9afa6541818d0327583283

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

# encoding: utf-8

require File.expand_path('../../../spec_helper.rb', __FILE__)

describe Backup::Configuration::Storage::Ninefold do
  before do
    Backup::Configuration::Storage::Ninefold.defaults do |nf|
      nf.storage_token  = 'my_storage_token'
      nf.storage_secret = 'my_storage_secret'
      nf.path           = 'my_backups'
    end
  end

  it 'should set the default Ninefold configuration' do
    ninefold = Backup::Configuration::Storage::Ninefold
    ninefold.storage_token.should  == 'my_storage_token'
    ninefold.storage_secret.should == 'my_storage_secret'
    ninefold.path.should           == 'my_backups'
  end

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

      ninefold = Backup::Configuration::Storage::Ninefold
      ninefold.storage_token.should  == nil
      ninefold.storage_secret.should == nil
      ninefold.path.should           == nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backup-3.0.20 spec/configuration/storage/ninefold_spec.rb