Sha256: 964dc8b64b8dc0b3efa480f67cdc80d33cf84841329b4169dff694274c641f96
Contents?: true
Size: 1.24 KB
Versions: 4
Compression:
Stored size: 1.24 KB
Contents
# encoding: utf-8 require File.expand_path('../../../spec_helper.rb', __FILE__) describe Backup::Configuration::Notifier::Twitter do before do Backup::Configuration::Notifier::Twitter.defaults do |tweet| tweet.consumer_key = 'my_consumer_key' tweet.consumer_secret = 'my_consumer_secret' tweet.oauth_token = 'my_oauth_token' tweet.oauth_token_secret = 'my_oauth_token_secret' end end after { Backup::Configuration::Notifier::Twitter.clear_defaults! } it 'should set the default tweet configuration' do tweet = Backup::Configuration::Notifier::Twitter tweet.consumer_key.should == 'my_consumer_key' tweet.consumer_secret.should == 'my_consumer_secret' tweet.oauth_token.should == 'my_oauth_token' tweet.oauth_token_secret.should == 'my_oauth_token_secret' end describe '#clear_defaults!' do it 'should clear all the defaults, resetting them to nil' do Backup::Configuration::Notifier::Twitter.clear_defaults! tweet = Backup::Configuration::Notifier::Twitter tweet.consumer_key.should == nil tweet.consumer_secret.should == nil tweet.oauth_token.should == nil tweet.oauth_token_secret.should == nil end end end
Version data entries
4 entries across 4 versions & 2 rubygems