Sha256: 8380f782cfc641ebf986bde3895725771c764a18e7790c11ee65258e95991322

Contents?: true

Size: 1.09 KB

Versions: 22

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Storage::RSync do
  before do
    Backup::Configuration::Storage::RSync.defaults do |rsync|
      rsync.username  = 'my_username'
      rsync.password  = 'my_password'
      rsync.ip        = '123.45.678.90'
      rsync.port      = 21
      rsync.path      = 'my_backups'
    end
  end

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

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

      rsync = Backup::Configuration::Storage::RSync
      rsync.username.should == nil
      rsync.password.should == nil
      rsync.ip.should       == nil
      rsync.port.should     == nil
      rsync.path.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/rsync_spec.rb
backup-3.0.16 spec/configuration/storage/rsync_spec.rb
backup-3.0.15 spec/configuration/storage/rsync_spec.rb
backup-3.0.14 spec/configuration/storage/rsync_spec.rb
backup-3.0.13 spec/configuration/storage/rsync_spec.rb
backup-3.0.12 spec/configuration/storage/rsync_spec.rb
backup-3.0.11 spec/configuration/storage/rsync_spec.rb
alg-backup-3.0.10 spec/configuration/storage/rsync_spec.rb
backup-3.0.10 spec/configuration/storage/rsync_spec.rb
backup-3.0.9 spec/configuration/storage/rsync_spec.rb
backup-3.0.8 spec/configuration/storage/rsync_spec.rb
backup-3.0.7 spec/configuration/storage/rsync_spec.rb
backup-3.0.6 spec/configuration/storage/rsync_spec.rb
backup-3.0.5 spec/configuration/storage/rsync_spec.rb
backup-3.0.4 spec/configuration/storage/rsync_spec.rb
backup-3.0.3 spec/configuration/storage/rsync_spec.rb
backup-3.0.2.build.0 spec/configuration/storage/rsync_spec.rb
backup-3.0.2 spec/configuration/storage/rsync_spec.rb
backup-3.0.1.build.0 spec/configuration/storage/rsync_spec.rb
backup-3.0.1 spec/configuration/storage/rsync_spec.rb