Sha256: b6375f57b90c6c16453f088a9d4a03d4f6536071bbc9035223165ea2a76428c7

Contents?: true

Size: 974 Bytes

Versions: 4

Compression:

Stored size: 974 Bytes

Contents

# encoding: utf-8

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

describe Backup::Configuration::Notifier::Base do
  before do
    Backup::Configuration::Notifier::Base.defaults do |base|
      base.on_success = 'on_success'
      base.on_warning = 'on_warning'
      base.on_failure = 'on_failure'
    end
  end
  after { Backup::Configuration::Notifier::Base.clear_defaults! }

  it 'should set the default campfire configuration' do
    base = Backup::Configuration::Notifier::Base
    base.on_success.should == 'on_success'
    base.on_warning.should == 'on_warning'
    base.on_failure.should == 'on_failure'
  end

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

      base = Backup::Configuration::Notifier::Base
      base.on_success.should be_nil
      base.on_warning.should be_nil
      base.on_failure.should be_nil
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

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