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:
parent
2f0755c967
commit
1711b0d589
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user