Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions spec/lib/appsignal/hooks/active_support_notifications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
end
around { |example| keep_transactions { example.run } }

# The before hook swaps in a fresh notifier (`as.notifier = notifier`) to
# control which subscriptions are active. Restore the original afterwards so
# the swap doesn't leak into later specs -- e.g. ActionMailer's
# instrumentation, which subscribes on the default notifier and would
# otherwise fire into the stale, subscription-less notifier left behind.
around do |example|
original_notifier = ActiveSupport::Notifications.notifier
example.run
ensure
ActiveSupport::Notifications.notifier = original_notifier
end

describe "#dependencies_present?" do
subject { described_class.new.dependencies_present? }

Expand Down
Loading