Sha256: efd6c176034d528d91e9c74c0ebf7037f296b9dc64c98bdcbc631bda403dc3b1

Contents?: true

Size: 1.13 KB

Versions: 22

Compression:

Stored size: 1.13 KB

Contents

# encoding: utf-8

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

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

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

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

      ftp = Backup::Configuration::Storage::FTP
      ftp.username.should == nil
      ftp.password.should == nil
      ftp.ip.should       == nil
      ftp.port.should     == nil
      ftp.path.should     == nil
      ftp.keep.should     == nil
    end
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

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