spec/msgr/msgr_spec.rb in msgr-0.3.0 vs spec/msgr/msgr_spec.rb in msgr-0.4.0

- old
+ new

@@ -31,6 +31,14 @@ client.publish 'Payload', to: 'routing.key' sleep 10 end + + describe '.after_load' do + before { allow_any_instance_of(Msgr::Client).to receive(:launch) } + + it 'should yield the given block when Msgr.start is called' do + expect { |cb| Msgr.after_load &cb; Msgr.start }.to yield_with_args + end + end end