spec/spec_helper.rb in logstash-logger-0.11.0 vs spec/spec_helper.rb in logstash-logger-0.12.0
- old
+ new
@@ -73,5 +73,16 @@
let(:redis_uri_config) { {uri: redis_uri} }
let(:kafka_uri_config) { {uri: kafka_uri} }
let(:stdout_uri_config) { {uri: stdout_uri} }
let(:stderr_uri_config) { {uri: stderr_uri} }
end
+
+RSpec.shared_context 'formatter' do
+ let(:severity) { "DEBUG" }
+ let(:time) { Time.now }
+ let(:progname) { "ruby" }
+ let(:message) { "foo" }
+ let(:hostname) { Socket.gethostname }
+ let(:formatted_message) do
+ subject.call(severity, time, progname, message)
+ end
+end