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