Sha256: c9fc34904574ecee5f075bdea5cae99cdbcef711bf40a072cba444698001648e

Contents?: true

Size: 488 Bytes

Versions: 12

Compression:

Stored size: 488 Bytes

Contents

require 'logstash-logger'

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

  let(:unix_socket) { double("UNIXSocket") }

  before(:each) do
    allow(::UNIXSocket).to receive(:new) { unix_socket }
  end

  it "writes to a local unix socket" do
    expect(unix_socket).to receive(:write)
    unix_device.write('foo')
  end

  context "when path is not specified" do
    it "raises an exception" do
      expect { described_class.new }.to raise_error
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
logstash-logger-0.12.0 spec/device/unix_spec.rb
logstash-logger-0.11.0 spec/device/unix_spec.rb
logstash-logger-0.10.3 spec/device/unix_spec.rb
logstash-logger-0.10.2 spec/device/unix_spec.rb
logstash-logger-0.10.1 spec/device/unix_spec.rb
logstash-logger-0.10.0 spec/device/unix_spec.rb
logstash-logger-0.9.0 spec/device/unix_spec.rb
logstash-logger-0.8.0 spec/device/unix_spec.rb
logstash-logger-0.7.0 spec/device/unix_spec.rb
logstash-logger-0.6.2 spec/device/unix_spec.rb
logstash-logger-0.6.1 spec/device/unix_spec.rb
logstash-logger-0.6.0 spec/device/unix_spec.rb