Sha256: 14c46dacc0714b55454380ef38b0a57664ca30e6b8c4d79434c83afa2a656899

Contents?: true

Size: 1.16 KB

Versions: 4

Compression:

Stored size: 1.16 KB

Contents

# encoding: utf-8

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

describe Backup::Configuration::Notifier::Presently do
  before do
    Backup::Configuration::Notifier::Presently.defaults do |presently|
      presently.subdomain = 'my_subdomain'
      presently.user_name = 'my_user_name'
      presently.password  = 'my_password'
      presently.group_id  = 'my_group_id'
    end
  end
  after { Backup::Configuration::Notifier::Presently.clear_defaults! }

  it 'should set the default tweet configuration' do
    presently = Backup::Configuration::Notifier::Presently
    presently.subdomain.should == 'my_subdomain'
    presently.user_name.should == 'my_user_name'
    presently.password.should  == 'my_password'
    presently.group_id.should  == 'my_group_id'
  end

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

      presently = Backup::Configuration::Notifier::Presently
      presently.subdomain.should == nil
      presently.user_name.should == nil
      presently.password.should  == nil
      presently.group_id.should  == nil
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

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