Sha256: c31ec59838459d3207347565d2f5383253666cf1c3c183927e341fd6b1778afe
Contents?: true
Size: 721 Bytes
Versions: 112
Compression:
Stored size: 721 Bytes
Contents
describe Appsignal::Utils::IntegrationLogger do let(:log) { std_stream } let(:logger) do Appsignal::Utils::IntegrationLogger.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
112 entries across 112 versions & 1 rubygems