7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/webhookdb/spec_helpers/sentry.rb', line 7
def self.included(context)
context.before(:each) do |example|
if example.metadata[:sentry]
Webhookdb::Sentry.dsn = "https://public:[email protected]/whdb"
hub = Sentry::Hub.new(
Sentry::Client.new(Sentry::Configuration.new),
Sentry::Scope.new,
)
expect(Sentry).to_not be_initialized
Sentry.instance_variable_set(:@main_hub, hub)
expect(Sentry).to be_initialized
end
end
context.after(:each) do |example|
if example.metadata[:sentry]
Webhookdb::Sentry.reset_configuration
expect(Sentry).to_not be_initialized
end
end
super
end
|