spec/event_spec.rb in reactor-0.4.2 vs spec/event_spec.rb in reactor-0.4.3
- old
+ new
@@ -33,9 +33,14 @@
it 'sets a fired_at key in event data' do
Reactor::Subscriber.any_instance.should_receive(:fire).with(hash_including(fired_at: anything))
Reactor::Event.perform(event_name, actor_id: '1')
end
+
+ it 'works with the legacy .process method, too' do
+ Reactor::Subscriber.any_instance.should_receive(:fire).with(hash_including(actor_id: '1'))
+ Reactor::Event.process(event_name, actor_id: '1')
+ end
end
describe 'reschedule', :sidekiq do
let(:scheduled) { Sidekiq::ScheduledSet.new }
let(:time) { 1.hour.from_now }