Sha256: 9617350d64b45b3228e54072875c059cfdb8ae33955402aa401a6674525f657b

Contents?: true

Size: 1.02 KB

Versions: 22

Compression:

Stored size: 1.02 KB

Contents

# encoding: utf-8

require File.dirname(__FILE__) + '/../../spec_helper'

describe Backup::Configuration::Database::Redis do
  before do
    Backup::Configuration::Database::Redis.defaults do |db|
      db.name                = 'mydb'
      db.path                = '/var/lib/redis/db'
      db.password            = 'mypassword'
      db.invoke_save         = true
      db.host                = 'localhost'
      db.port                = 123
      db.socket              = '/redis.sock'
      db.additional_options  = %w[my options]
    end
  end

  it 'should set the default Redis configuration' do
    db = Backup::Configuration::Database::Redis
    db.name.should                == 'mydb'
    db.path.should                == '/var/lib/redis/db'
    db.password.should            == 'mypassword'
    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]
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
backup-3.0.0.build.0 spec/configuration/database/redis_spec.rb
backup-3.0.0 spec/configuration/database/redis_spec.rb