Sha256: b493fd76792975769842e0bfa58b4407398ebb637d4d4f23042b7e837d958cab

Contents?: true

Size: 982 Bytes

Versions: 4

Compression:

Stored size: 982 Bytes

Contents

# encoding: utf-8

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

describe Backup::Configuration::Compressor::Pbzip2 do
  before do
    Backup::Configuration::Compressor::Pbzip2.defaults do |compressor|
      compressor.best = true
      compressor.fast = true
      compressor.processors = 2
    end
  end
  after { Backup::Configuration::Compressor::Pbzip2.clear_defaults! }

  it 'should set the default compressor configuration' do
    compressor = Backup::Configuration::Compressor::Pbzip2
    compressor.best.should == true
    compressor.fast.should == true
    compressor.processors.should == 2
  end

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

      compressor = Backup::Configuration::Compressor::Pbzip2
      compressor.best.should == nil
      compressor.fast.should == nil
      compressor.processors.should == nil
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
backup_checksum-3.0.23 spec/configuration/compressor/pbzip2_spec.rb
backup-3.0.23 spec/configuration/compressor/pbzip2_spec.rb
backup-3.0.22 spec/configuration/compressor/pbzip2_spec.rb
backup-3.0.21 spec/configuration/compressor/pbzip2_spec.rb