Sha256: 25f9314fa79539b486f178c3edb8c3fe062295e2289ea3dacdd39627be544633

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Syncer::RSync::Base do
  before do
    Backup::Configuration::Syncer::RSync::Base.defaults do |rsync|
      #rsync.directories         = 'cannot_have_a_default_value'
      rsync.path                = '~/backups/'
      rsync.mirror              = true
      rsync.additional_options  = []
    end
  end
  after { Backup::Configuration::Syncer::RSync::Base.clear_defaults! }

  it 'should set the default rsync configuration' do
    rsync = Backup::Configuration::Syncer::RSync::Base
    rsync.path.should               == '~/backups/'
    rsync.mirror.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::Base.clear_defaults!

      rsync = Backup::Configuration::Syncer::RSync::Base
      rsync.path.should               == nil
      rsync.mirror.should             == nil
      rsync.additional_options.should == nil
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
backup_checksum-3.0.23 spec/configuration/syncer/rsync/base_spec.rb
backup-3.0.23 spec/configuration/syncer/rsync/base_spec.rb
backup-3.0.22 spec/configuration/syncer/rsync/base_spec.rb
backup-3.0.21 spec/configuration/syncer/rsync/base_spec.rb