spec/outputs/stdout_spec.rb in logstash-output-stdout-3.0.2 vs spec/outputs/stdout_spec.rb in logstash-output-stdout-3.1.0
- old
+ new
@@ -11,19 +11,20 @@
describe "#send" do
subject { LogStash::Outputs::Stdout.new({}) }
let(:properties) { { "message" => "This is a message!"} }
- let(:event) { LogStash::Event.new(properties) }
+ let(:event) { double("event") }
+ let(:encoded) { double("encoded") }
before(:each) do
subject.register
end
it "sends the generated event out" do
- expect(subject.codec).to receive(:encode).with(event)
- subject.receive(event)
+ expect($stdout).to receive(:write).with(encoded)
+ subject.multi_receive_encoded([[event, encoded]])
end
-
+
end
end