Sha256: 510c229f12035dd2e96d3e01ce78a6beef949364a24453ced3deaea294eed5a7

Contents?: true

Size: 1.41 KB

Versions: 18

Compression:

Stored size: 1.41 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Syncer::RSync do
  before do
    Backup::Configuration::Syncer::RSync.defaults do |rsync|
      rsync.username  = 'my_username'
      rsync.password  = 'my_password'
      rsync.ip        = '123.45.678.90'
      rsync.port      = 22
      rsync.path      = '~/backups/'
      rsync.mirror    = true
      rsync.compress  = true
      rsync.additional_options = []
    end
  end

  it 'should set the default rsync configuration' do
    rsync = Backup::Configuration::Syncer::RSync
    rsync.username.should  == 'my_username'
    rsync.password.should  == 'my_password'
    rsync.ip.should        == '123.45.678.90'
    rsync.port.should      == 22
    rsync.path.should      == '~/backups/'
    rsync.mirror.should    == true
    rsync.compress.should  == true
    rsync.additional_options.should == []
  end

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

      rsync = Backup::Configuration::Syncer::RSync
      rsync.username.should  == nil
      rsync.password.should  == nil
      rsync.ip.should        == nil
      rsync.port.should      == nil
      rsync.path.should      == nil
      rsync.mirror.should    == nil
      rsync.compress.should  == nil
      rsync.additional_options.should == nil
    end
  end
end

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
backup-3.0.19 spec/configuration/syncer/rsync_spec.rb
backup-3.0.18 spec/configuration/syncer/rsync_spec.rb
interu-backup-3.0.16 spec/configuration/syncer/rsync_spec.rb
backup-3.0.16 spec/configuration/syncer/rsync_spec.rb
backup-3.0.15 spec/configuration/syncer/rsync_spec.rb
backup-3.0.14 spec/configuration/syncer/rsync_spec.rb
backup-3.0.13 spec/configuration/syncer/rsync_spec.rb
backup-3.0.12 spec/configuration/syncer/rsync_spec.rb
backup-3.0.11 spec/configuration/syncer/rsync_spec.rb
alg-backup-3.0.10 spec/configuration/syncer/rsync_spec.rb
backup-3.0.10 spec/configuration/syncer/rsync_spec.rb
backup-3.0.9 spec/configuration/syncer/rsync_spec.rb
backup-3.0.8 spec/configuration/syncer/rsync_spec.rb
backup-3.0.7 spec/configuration/syncer/rsync_spec.rb
backup-3.0.6 spec/configuration/syncer/rsync_spec.rb
backup-3.0.5 spec/configuration/syncer/rsync_spec.rb
backup-3.0.4 spec/configuration/syncer/rsync_spec.rb
backup-3.0.3 spec/configuration/syncer/rsync_spec.rb