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

Resolve Ruby warning in spec for Rackstash::Encoders::Logstash

This resolves the following warning:

> spec/rackstash/encoders/logstash_spec.rb:18: warning: ambiguous first
> argument; put parentheses or a space even after `/' operator
This commit is contained in:
Holger Just 2017-09-21 22:34:47 +02:00
parent 2f0755c967
commit 1711b0d589

View File

@ -15,7 +15,7 @@ describe Rackstash::Encoders::Logstash do
it 'formats the passed event hash as a JSON string and includes @version' do it 'formats the passed event hash as a JSON string and includes @version' do
event = { 'hello' => 'world', 'message' => ["hello\n", "world"] } event = { 'hello' => 'world', 'message' => ["hello\n", "world"] }
expect(encoder.encode(event)) expect(encoder.encode(event))
.to match /\A\{"hello":"world","message":"hello\\nworld","@version":"1","@timestamp":"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{6}Z"\}\z/ .to match(/\A\{"hello":"world","message":"hello\\nworld","@version":"1","@timestamp":"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{6}Z"\}\z/)
end end
end end
end end