From 3bdd8ef3a8561976c7fd8eb1939907764ae19553 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Fri, 2 Sep 2016 15:18:15 +0100 Subject: [PATCH] Wut? --- spec/jdbc_spec_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/jdbc_spec_helper.rb b/spec/jdbc_spec_helper.rb index 04e8d98..b3c618b 100644 --- a/spec/jdbc_spec_helper.rb +++ b/spec/jdbc_spec_helper.rb @@ -49,10 +49,12 @@ RSpec.shared_context 'when outputting messages' do let(:event) { LogStash::Event.new(event_fields) } let(:plugin) do + # Setup logger + expect(LogStash::Ouputs::Jdbc).to receive(:logger).and_return(logger).at_least(:once) + # Setup plugin output = LogStash::Plugin.lookup('output', 'jdbc').new(jdbc_settings) output.register - output.logger = logger # Setup table c = output.instance_variable_get(:@pool).getConnection