test/metric/signalfx_test.rb in semantic_logger-4.2.0 vs test/metric/signalfx_test.rb in semantic_logger-4.2.1

- old
+ new

@@ -25,11 +25,11 @@ if ENV['SIGNALFX_TOKEN'] appender.log(@log) else response_mock = Struct.new(:code, :body) request = nil - appender.http.stub(:request, -> r { request = r; response_mock.new('200', 'ok') }) do + appender.http.stub(:request, ->(r) { request = r; response_mock.new('200', 'ok') }) do appender.log(@log) end end end @@ -48,11 +48,11 @@ assert response end it 'whitelists dimensions' do @log.named_tags = {user_id: 47, application: 'sample', tracking_number: 7474, session_id: 'hsdhngsd'} - appender.formatter.dimensions = [:user_id, :application] + appender.formatter.dimensions = %i[user_id application] assert response end end describe 'should_log?' do @@ -60,19 +60,18 @@ assert appender.should_log?(@log) end it 'not logs when no metric' do @log.message = 'blah' - @log.metric = nil + @log.metric = nil refute appender.should_log?(@log) end it 'logs metric only metric with dimensions' do - @log.metric = 'Filter/count' + @log.metric = 'Filter/count' @log.dimensions = {action: 'hit', user: 'jbloggs', state: 'FL'} assert appender.should_log?(@log) end end - end end end