spec/inputs/exec_spec.rb in logstash-input-exec-3.1.1 vs spec/inputs/exec_spec.rb in logstash-input-exec-3.1.2

- old
+ new

@@ -13,20 +13,20 @@ context "when operating normally" do let(:input) { LogStash::Plugin.lookup("input", "exec").new("command" => "ls", "interval" => 0) } let(:queue) { [] } let(:loggr) { double('loggr') } - before do + before :each do + expect(LogStash::Inputs::Exec).to receive(:logger).and_return(loggr).exactly(7).times allow(loggr).to receive(:info) allow(loggr).to receive(:info?) allow(loggr).to receive(:warn) allow(loggr).to receive(:warn?) allow(loggr).to receive(:debug) allow(loggr).to receive(:debug?) end it "enqueues some events" do - input.logger = loggr input.register expect(loggr).not_to receive(:error) input.inner_run(queue)