gitlab-org--gitlab-foss/spec/support/sentry.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
396 B
Ruby
Raw Normal View History

# frozen_string_literal: true
RSpec.configure do |config|
config.around(:example, :sentry) do |example|
dsn = Sentry.get_current_client.configuration.dsn
Sentry.get_current_client.configuration.dsn = 'dummy://b44a0828b72421a6d8e99efd68d44fa8@example.com/42'
begin
example.run
ensure
Sentry.get_current_client.configuration.dsn = dsn.to_s.presence
end
end
end