add comments

This commit is contained in:
Colin Surprenant 2015-11-25 10:01:20 -05:00
parent 372e1d73ff
commit 619a590c72

View file

@ -136,6 +136,10 @@ describe LogStash::Event do
end
end
# noop logger used to test the injectable logger in Event
# this implementation is not complete because only the warn
# method is used in Event.
module DummyLogger
def self.warn(message)
# do nothing
@ -147,6 +151,10 @@ describe LogStash::Event do
let(:logger) { double("Logger") }
after(:each) { LogStash::Event.logger = nil }
# the following 2 specs are using both a real module (DummyLogger)
# and a mock. both tests are needed to make sure the implementation
# supports both types of objects.
it "should set logger using a module" do
LogStash::Event.logger = DummyLogger
expect(DummyLogger).to receive(:warn).once