spec/spec_helper.rb in datadog-notifications-0.6.2 vs spec/spec_helper.rb in datadog-notifications-0.6.3

- old
+ new

@@ -20,12 +20,12 @@ ### Mocks module Mock class Reporter < Datadog::Notifications::Reporter - def timing(stat, _millis, opts={}) - super(stat, 333, opts) + def timing(stat, _millis, **opts) + super(stat, 333, **opts) end def send_stat(message) messages.push message end @@ -34,11 +34,11 @@ @messages ||= [] end end class Instrumentable - def initialize(opts={}) + def initialize(**opts) @opts = opts end def perform ActiveSupport::Notifications.instrument('mock.start', @opts) @@ -69,15 +69,15 @@ c.reporter = Mock::Reporter c.tags = ['custom:tag'] c.use Datadog::Notifications::Plugins::ActiveRecord c.use Datadog::Notifications::Plugins::Grape, - tags: ['more:tags'], - metric_name: 'api.request', - exception_handler: lambda {|e| - if e.message.include?('unauthorized') - 401 - else - Datadog::Notifications::Plugins::Grape.exception_status(e) - end - } + tags: ['more:tags'], + metric_name: 'api.request', + exception_handler: lambda {|e| + if e.message.include?('unauthorized') + 401 + else + Datadog::Notifications::Plugins::Grape.exception_status(e) + end + } end