Sha256: 5afa85b33cbf2e347cf47dfd8787e055694c55e999814dd9b46111e90f02ad39
Contents?: true
Size: 633 Bytes
Versions: 2
Compression:
Stored size: 633 Bytes
Contents
require "spec_helper" describe Timber::LogEntry do let(:time) { Time.utc(2016, 9, 1, 12, 0, 0) } describe "#to_msgpack" do it "should encode properly with an event and context" do event = { message: "event_message", event: { event_type: { a: 1 } } } context = {custom: {a: "b"}} log_entry = described_class.new("INFO", time, nil, "log message", context, event) msgpack = log_entry.to_msgpack expect(msgpack).to start_with("\x85\xA5level\xA4INFO\xA2dt\xBB2016-09-01T12:00:00.000000Z".force_encoding("ASCII-8BIT")) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
timber-3.0.1 | spec/timber/log_entry_spec.rb |
timber-3.0.0 | spec/timber/log_entry_spec.rb |