Sha256: fad7e4ef603e0769b1063787aa7e02099abcfc2f6cd1c86175ad266e6f138fa6

Contents?: true

Size: 503 Bytes

Versions: 3

Compression:

Stored size: 503 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(ArgumentError)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
logstash-logger-0.14.1 spec/device/unix_spec.rb
logstash-logger-0.14.0 spec/device/unix_spec.rb
logstash-logger-0.13.0 spec/device/unix_spec.rb