module PubSub::Testing::SubscriptionsHelper
Public Class Methods
clear_wisper_subscriptions!()
click to toggle source
# File lib/pub_sub/testing/subscription_helpers.rb, line 17 def clear_wisper_subscriptions! PubSub.subscriptions.clear! subscribe_logger! end
subscribe_logger!()
click to toggle source
# File lib/pub_sub/testing/subscription_helpers.rb, line 12 def subscribe_logger! PubSub.subscriptions.register(:logging) end
Public Instance Methods
with_subscription_to(*domains) { || ... }
click to toggle source
# File lib/pub_sub/testing/subscription_helpers.rb, line 4 def with_subscription_to(*domains) domains.each do |domain| PubSub.subscriptions.register(domain) end yield clear_wisper_subscriptions! end
Private Instance Methods
clear_wisper_subscriptions!()
click to toggle source
# File lib/pub_sub/testing/subscription_helpers.rb, line 17 def clear_wisper_subscriptions! PubSub.subscriptions.clear! subscribe_logger! end
subscribe_logger!()
click to toggle source
# File lib/pub_sub/testing/subscription_helpers.rb, line 12 def subscribe_logger! PubSub.subscriptions.register(:logging) end