1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Remove unused RawFormatter

This commit is contained in:
Holger Just 2020-08-04 18:07:42 +02:00 committed by Holger Just
parent 1249b6ac47
commit bb78d98639
2 changed files with 0 additions and 22 deletions

View File

@ -27,10 +27,4 @@ module Rackstash
"#{msg2str(msg)}\n".freeze
end
end
class RawFormatter
def call(_severity, _timestamp, _progname, msg)
msg.is_a?(String) ? msg : msg.inspect
end
end
end

View File

@ -58,19 +58,3 @@ RSpec.describe Rackstash::Formatter do
.and be_frozen
end
end
RSpec.describe Rackstash::RawFormatter do
let(:formatter) { described_class.new }
it 'returns the message' do
msg = 'my message'
expect(formatter.call('ERROR', Time.now, 'progname', msg)).to equal msg
end
it 'inspects non-string messages' do
obj = Object.new
expect(obj).to receive(:inspect).and_return('object')
expect(formatter.call('ERROR', Time.now, 'progname', obj)).to eql 'object'
end
end