Sha256: 0ad03052cc745b9f725c37303c52b2677a5f71be3ab4f34945f432a9cf18fb0c
Contents?: true
Size: 744 Bytes
Versions: 2
Compression:
Stored size: 744 Bytes
Contents
require 'spec/helper' DELAY = 0.25 describe EMJack do it "should fire sequential Beanstalk requests" do EventMachine.run do Fiber.new { jack = EMJack::Connection.new r = jack.use('mytube') r.should == 'mytube' EventMachine.stop }.resume end end it "should fire multiple requests in parallel" do EventMachine.run do Fiber.new { jack = EMJack::Connection.new multi = EventMachine::Multi.new multi.add jack.ause('mytube-1') multi.add jack.ause('mytube-2') res = multi.perform res.responses.size.should == 2 p [:multi, res.responses] EventMachine.stop }.resume end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-synchrony-0.1.2 | spec/beanstalk_spec.rb |
em-synchrony-0.1.1 | spec/beanstalk_spec.rb |