Sha256: 66a9762d8c0d34c044ca9283819314a040de98f0e3aa9c81d2483ab613cd45da

Contents?: true

Size: 447 Bytes

Versions: 3

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper'
require 'service_template/logger/parseable'

describe Logging::Layouts::Parseable do
  context '#format_obj' do
    it 'formats text as an object' do
      p = Logging::Layouts::Parseable.new
      expect(p.format_obj('foobar')).to eq({ text: 'foobar' })
    end

    it 'does not reformat objects' do
      p = Logging::Layouts::Parseable.new
      expect(p.format_obj({ foo: :bar })).to eq({ foo: :bar })
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
service_template-0.5.2 spec/logger/parseable_spec.rb
service_template-0.5.1 spec/logger/parseable_spec.rb
service_template-0.5.0 spec/logger/parseable_spec.rb