Sha256: f18c2069d671cc684b5a707ac398da47dee817a65eb1c5ef2c92e00016a69c5b
Contents?: true
Size: 685 Bytes
Versions: 140
Compression:
Stored size: 685 Bytes
Contents
describe Appsignal::Logger do let(:log) { std_stream } let(:logger) do Appsignal::Logger.new(log).tap do |l| l.formatter = logger_formatter end end describe "#seen_keys" do it "returns a Set" do expect(logger.seen_keys).to be_a(Set) end end describe "#warn_once_then_debug" do it "only warns once, then uses debug" do message = "This is a log line" 3.times { logger.warn_once_then_debug(:key, message) } logs = log_contents(log) expect(logs.scan(/#{Regexp.escape(log_line(:WARN, message))}/).count).to eql(1) expect(logs.scan(/#{Regexp.escape(log_line(:DEBUG, message))}/).count).to eql(2) end end end
Version data entries
140 entries across 140 versions & 1 rubygems