diff --git a/lib/uniform_notifier/sentry.rb b/lib/uniform_notifier/sentry.rb index 55c57f3..4382d23 100644 --- a/lib/uniform_notifier/sentry.rb +++ b/lib/uniform_notifier/sentry.rb @@ -16,7 +16,7 @@ def _out_of_channel_notify(data) opt = UniformNotifier.sentry if UniformNotifier.sentry.is_a?(Hash) exception = Exception.new(message) - Sentry.capture_exception(exception, opt) + Sentry.capture_exception(exception, **opt) end end end diff --git a/spec/uniform_notifier/sentry_spec.rb b/spec/uniform_notifier/sentry_spec.rb index 580cd21..34a11a6 100644 --- a/spec/uniform_notifier/sentry_spec.rb +++ b/spec/uniform_notifier/sentry_spec.rb @@ -12,7 +12,7 @@ class Sentry end it 'should notify sentry' do - expect(Sentry).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry'), {}) + expect(Sentry).to receive(:capture_exception).with(UniformNotifier::Exception.new('notify sentry')) UniformNotifier.sentry = true UniformNotifier::SentryNotifier.out_of_channel_notify(title: 'notify sentry')