From e29c8976bb1ba648b4ba0bc43194bf10949b29f8 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Mon, 19 Jun 2017 10:27:27 +0200 Subject: [PATCH] Clarify that the JSON encoder strips all whitespace --- spec/rackstash/encoders/json_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/rackstash/encoders/json_spec.rb b/spec/rackstash/encoders/json_spec.rb index be3d362..67433e1 100644 --- a/spec/rackstash/encoders/json_spec.rb +++ b/spec/rackstash/encoders/json_spec.rb @@ -21,8 +21,8 @@ describe Rackstash::Encoders::JSON do expect(encoder.encode(event)).to eql '{"message":"text\nwith\nnewlines"}' end - it 'rstrips the message' do - event = { 'message' => "line1\nline2\n \n\t\n" } + it 'strips the message from all surpunding whitespace' do + event = { 'message' => "\n\t \nline1\nline2\n \n\t\n" } expect(encoder.encode(event)).to eql '{"message":"line1\nline2"}' end end