Sha256: cb159ebd9be375779e3761dcb936b073b4a74b28d45af356ff434af237a945ff

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Encryptor::OpenSSL do
  before do
    Backup::Configuration::Encryptor::OpenSSL.defaults do |encryptor|
      encryptor.password = 'my_password'
      encryptor.password_file = nil
      encryptor.base64   = true
      encryptor.salt     = true
    end
  end

  it 'should set the default encryptor configuration' do
    encryptor = Backup::Configuration::Encryptor::OpenSSL
    encryptor.password.should == 'my_password'
    encryptor.password_file.should == nil
    encryptor.base64.should   == true
    encryptor.salt.should     == true
  end

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

      encryptor = Backup::Configuration::Encryptor::OpenSSL
      encryptor.password.should == nil
      encryptor.password_file.should == nil
      encryptor.base64.should   == nil
      encryptor.salt.should     == nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backup-3.0.20 spec/configuration/encryptor/open_ssl_spec.rb