spec/configuration/database/redis_spec.rb in backup-3.0.20 vs spec/configuration/database/redis_spec.rb in backup-3.0.21

- old
+ new

@@ -11,12 +11,14 @@ db.invoke_save = true db.host = 'localhost' db.port = 123 db.socket = '/redis.sock' db.additional_options = %w[my options] + db.redis_cli_utility = '/path/to/redis-cli' end end + after { Backup::Configuration::Database::Redis.clear_defaults! } it 'should set the default Redis configuration' do db = Backup::Configuration::Database::Redis db.name.should == 'mydb' db.path.should == '/var/lib/redis/db' @@ -24,10 +26,11 @@ db.invoke_save.should == true db.host.should == 'localhost' db.port.should == 123 db.socket.should == '/redis.sock' db.additional_options.should == %w[my options] + db.redis_cli_utility.should == '/path/to/redis-cli' end describe '#clear_defaults!' do it 'should clear all the defaults, resetting them to nil' do Backup::Configuration::Database::Redis.clear_defaults! @@ -39,8 +42,9 @@ db.invoke_save.should == nil db.host.should == nil db.port.should == nil db.socket.should == nil db.additional_options.should == nil + db.redis_cli_utility.should == nil end end end