Sha256: 70c0da9dd81bc4a8a4716384e76ecd5525063b088b3c09cf57935c31bffa6892

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

# encoding: utf-8

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

describe Backup::Encryptor::Base do
  let(:base) { Backup::Encryptor::Base.new }

  it 'should include CLI::Helpers' do
    Backup::Encryptor::Base.
      include?(Backup::CLI::Helpers).should be_true
  end

  it 'should include Configuration::Helpers' do
    Backup::Encryptor::Base.
      include?(Backup::Configuration::Helpers).should be_true
  end

  describe '#initialize' do
    it 'should load defaults' do
      Backup::Encryptor::Base.any_instance.expects(:load_defaults!)
      base
    end
  end

  describe '#encryptor_name' do
    it 'should return class name with Backup namespace removed' do
      base.send(:encryptor_name).should == 'Encryptor::Base'
    end
  end

  describe '#log!' do
    it 'should log a message' do
      base.expects(:encryptor_name).returns('Encryptor Name')
      Backup::Logger.expects(:message).with(
        'Using Encryptor Name to encrypt the archive.'
      )
      base.send(:log!)
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
backup-agoddard-3.0.28 spec/encryptor/base_spec.rb
backup-agoddard-3.0.27 spec/encryptor/base_spec.rb
ey-vendored-backup-3.0.27 spec/encryptor/base_spec.rb
backup-3.0.27 spec/encryptor/base_spec.rb
backup-3.0.26 spec/encryptor/base_spec.rb
backup-3.0.25 spec/encryptor/base_spec.rb
backup-3.0.24 spec/encryptor/base_spec.rb