class ActiveEventStore::HaveEnqueuedAsyncSubscriberFor
Public Class Methods
new(subscriber_class)
click to toggle source
Calls superclass method
# File lib/active_event_store/rspec/have_enqueued_async_subscriber_for.rb, line 40 def initialize(subscriber_class) subscriber_job = ActiveEventStore::SubscriberJob.for(subscriber_class) if subscriber_job.nil? raise( RSpec::Expectations::ExpectationNotMetError, "No such async subscriber: #{subscriber_class.name}" ) end super(subscriber_job) on_queue("events_subscribers") end
Public Instance Methods
matches?(block)
click to toggle source
Calls superclass method
# File lib/active_event_store/rspec/have_enqueued_async_subscriber_for.rb, line 56 def matches?(block) raise ArgumentError, "have_enqueued_async_subscriber_for only supports block expectations" unless block.is_a?(Proc) # Make sure that there is a transaction super(proc { ActiveRecord::Base.transaction(&block) }) end
with(event)
click to toggle source
Calls superclass method
# File lib/active_event_store/rspec/have_enqueued_async_subscriber_for.rb, line 52 def with(event) super(EventMatcher.new(event)) end