Sha256: d666899db4e9aeb8d50fbd8238cb59cbddf0dcae7035641236502d160beb3e87

Contents?: true

Size: 468 Bytes

Versions: 7

Compression:

Stored size: 468 Bytes

Contents

require 'logstash-logger'
require 'redis'

describe LogStashLogger::Device::Redis do
  include_context 'device'

  let(:redis) { double("Redis") }

  before(:each) do
    allow(Redis).to receive(:new) { redis }
    allow(redis).to receive(:connect)
  end

  it "writes to a Redis list" do
    expect(redis).to receive(:rpush)
    redis_device.write "foo"
  end

  it "defaults the Redis list to 'logstash'" do
    expect(redis_device.list).to eq('logstash')
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
logstash-logger-0.10.0 spec/device/redis_spec.rb
logstash-logger-0.9.0 spec/device/redis_spec.rb
logstash-logger-0.8.0 spec/device/redis_spec.rb
logstash-logger-0.7.0 spec/device/redis_spec.rb
logstash-logger-0.6.2 spec/device/redis_spec.rb
logstash-logger-0.6.1 spec/device/redis_spec.rb
logstash-logger-0.6.0 spec/device/redis_spec.rb