spec/event_spec.rb in reactor-0.8.2 vs spec/event_spec.rb in reactor-0.8.3
- old
+ new
@@ -16,11 +16,11 @@
let(:event_name) { :user_did_this }
describe 'publish' do
it 'fires the first perform and sets message event_id' do
- Reactor::Event.should_receive(:perform_async).with(event_name, 'actor_id' => '1', 'event' => :user_did_this)
+ expect(Reactor::Event).to receive(:perform_async).with(event_name, 'actor_id' => '1', 'event' => :user_did_this)
Reactor::Event.publish(:user_did_this, actor_id: '1')
end
end
describe 'perform' do
@@ -49,10 +49,10 @@
Reactor::SUBSCRIBERS['barfed'] ||= []
Reactor::SUBSCRIBERS['barfed'] << Reactor::Subscribable::StaticSubscriberFactory.create('barfed') do |event|
raise 'UNEXPECTED!'
end
Reactor::SUBSCRIBERS['barfed'] << Reactor::Subscribable::StaticSubscriberFactory.create('barfed') do |event|
- double.some_method
+ mock.some_method
end
end
it 'doesnt matter because it runs in a separate worker process' do
expect { barfing_event }.to_not raise_exception