Sha256: a26d8f8576e735547ec957cde63258930e14a5ca03768d254dbd5670cccd3bab

Contents?: true

Size: 762 Bytes

Versions: 10

Compression:

Stored size: 762 Bytes

Contents

require 'spec/helper/all'

DELAY = 0.25

__END__
describe EMJack do

  it "should fire sequential Beanstalk requests" do
    pending

    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
    pending

    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

10 entries across 10 versions & 1 rubygems

Version Path
em-synchrony-1.0.6 spec/beanstalk_spec.rb
em-synchrony-1.0.5 spec/beanstalk_spec.rb
em-synchrony-1.0.4 spec/beanstalk_spec.rb
em-synchrony-1.0.3 spec/beanstalk_spec.rb
em-synchrony-1.0.2 spec/beanstalk_spec.rb
em-synchrony-1.0.1 spec/beanstalk_spec.rb
em-synchrony-1.0.0 spec/beanstalk_spec.rb
em-synchrony-0.3.0.beta.1 spec/beanstalk_spec.rb
em-synchrony-0.2.0 spec/beanstalk_spec.rb
em-synchrony-0.1.5 spec/beanstalk_spec.rb