Skip to content

Commit 3da4aac

Browse files
committed
chore(sidekiq): move rails spec to spec/isolated
1 parent e4608f5 commit 3da4aac

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

sentry-sidekiq/spec/sentry/rails_spec.rb renamed to sentry-sidekiq/spec/isolated/rails_spec.rb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# frozen_string_literal: true
22

3-
return unless ENV["WITH_SENTRY_RAILS"]
3+
begin
4+
require "simplecov"
5+
SimpleCov.command_name "SidekiqRails"
6+
rescue LoadError
7+
end
48

59
require "logger"
610

711
require "rails"
812
require "sentry-rails"
9-
require "spec_helper"
1013

1114
require "action_controller/railtie"
1215

@@ -23,15 +26,9 @@ def self.name
2326
app.config.hosts = nil
2427
app.config.secret_key_base = "test"
2528
app.config.eager_load = false
29+
2630
app.initializer :configure_sentry do
27-
Sentry.init do |config|
28-
config.release = 'beta'
29-
config.dsn = "dummy://12345:67890@sentry.localdomain:3000/sentry/42"
30-
config.transport.transport_class = Sentry::DummyTransport
31-
# for sending events synchronously
32-
config.background_worker_threads = 0
33-
yield(config, app) if block_given?
34-
end
31+
perform_basic_setup
3532
end
3633

3734
app.initialize!

0 commit comments

Comments
 (0)