test/appender/elasticsearch_test.rb in semantic_logger-3.2.1 vs test/appender/elasticsearch_test.rb in semantic_logger-3.3.0
- old
+ new
@@ -5,13 +5,15 @@
class ElasticsearchTest < Minitest::Test
response_mock = Struct.new(:code, :body)
describe SemanticLogger::Appender::Elasticsearch do
before do
- @appender = SemanticLogger::Appender::Elasticsearch.new(
- url: 'http://localhost:9200'
- )
- @message = 'AppenderElasticsearchTest log message'
+ Net::HTTP.stub_any_instance(:start, true) do
+ @appender = SemanticLogger::Appender::Elasticsearch.new(
+ url: 'http://localhost:9200'
+ )
+ end
+ @message = 'AppenderElasticsearchTest log message'
end
it 'logs to daily indexes' do
index = nil
@appender.stub(:post, -> json, ind { index = ind }) do