Sha256: d0d4dadf9439bca73ddbd53f1824f831f25d447729c0fd1293ef500351b4902f

Contents?: true

Size: 1.15 KB

Versions: 24

Compression:

Stored size: 1.15 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Storage::SFTP do
  before do
    Backup::Configuration::Storage::SFTP.defaults do |sftp|
      sftp.username  = 'my_username'
      sftp.password  = 'my_password'
      sftp.ip        = '123.45.678.90'
      sftp.port      = 22
      sftp.path      = 'my_backups'
      sftp.keep      = 20
    end
  end

  it 'should set the default sftp configuration' do
    sftp = Backup::Configuration::Storage::SFTP
    sftp.username.should == 'my_username'
    sftp.password.should == 'my_password'
    sftp.ip.should       == '123.45.678.90'
    sftp.port.should     == 22
    sftp.path.should     == 'my_backups'
    sftp.keep.should     == 20
  end

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

      sftp = Backup::Configuration::Storage::SFTP
      sftp.username.should == nil
      sftp.password.should == nil
      sftp.ip.should       == nil
      sftp.port.should     == nil
      sftp.path.should     == nil
      sftp.keep.should     == nil
    end
  end
end

Version data entries

24 entries across 24 versions & 3 rubygems

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