Sha256: 997e5a81014874fbbec8f35c5ef64795b578482f36b2a8dcbfeecbe918d8f084

Contents?: true

Size: 653 Bytes

Versions: 10

Compression:

Stored size: 653 Bytes

Contents

# encoding: utf-8
require_relative "../spec_helper"

describe LogStash::Outputs::Stdout do

  it "should register without errors" do
    plugin = LogStash::Plugin.lookup("output", "stdout").new({})
    expect { plugin.register }.to_not raise_error
  end

  describe "#send" do

    subject { LogStash::Outputs::Stdout.new({}) }

    let(:properties) { { "message" => "This is a message!"} }
    let(:event)      { LogStash::Event.new(properties) }

    before(:each) do
      subject.register
    end

    it "sends the generated event out" do
      expect(subject.codec).to receive(:encode).with(event)
      subject.receive(event)
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
logstash-output-stdout-3.0.2 spec/outputs/stdout_spec.rb
logstash-output-stdout-3.0.1 spec/outputs/stdout_spec.rb
logstash-output-stdout-3.0.0 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.6 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.4 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.3 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.2 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.1 spec/outputs/stdout_spec.rb
logstash-output-stdout-2.0.0 spec/outputs/stdout_spec.rb
logstash-output-stdout-1.1.0 spec/outputs/stdout_spec.rb