Sha256: 7259a204532c49c345ff451f97d480f530e6ef32a74352d29f20a44c658980ed

Contents?: true

Size: 1005 Bytes

Versions: 1

Compression:

Stored size: 1005 Bytes

Contents

# encoding: utf-8

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

describe Backup::Configuration::Notifier::Campfire do
  before do
    Backup::Configuration::Notifier::Campfire.defaults do |campfire|
      campfire.api_token = 'my_api_authentication_token'
      campfire.subdomain = 'my_subdomain'
      campfire.room_id   = 'my_room_id'
    end
  end

  it 'should set the default campfire configuration' do
    campfire = Backup::Configuration::Notifier::Campfire
    campfire.api_token.should == 'my_api_authentication_token'
    campfire.subdomain.should == 'my_subdomain'
    campfire.room_id.should   == 'my_room_id'
  end

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

      campfire = Backup::Configuration::Notifier::Campfire
      campfire.api_token.should == nil
      campfire.subdomain.should == nil
      campfire.room_id.should   == nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
backup-3.0.20 spec/configuration/notifier/campfire_spec.rb