Sha256: be73e6af6830191a0b4b7eaa17fe3893ca95c5c2428adcdbc47be7ca1ce380a4

Contents?: true

Size: 586 Bytes

Versions: 15

Compression:

Stored size: 586 Bytes

Contents

require 'spec_helper'

class TestEventedMailbox < Celluloid::EventedMailbox
  class Reactor
    def initialize
      @condition = ConditionVariable.new
      @mutex = Mutex.new
    end

    def wakeup
      @mutex.synchronize do
        @condition.signal
      end
    end

    def run_once(timeout)
      @mutex.synchronize do
        @condition.wait(@mutex, timeout)
      end
    end

    def shutdown
    end
  end

  def initialize
    super(Reactor)
  end
end

describe Celluloid::EventedMailbox do
  subject { TestEventedMailbox.new }
  it_behaves_like "a Celluloid Mailbox"
end

Version data entries

15 entries across 13 versions & 5 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/celluloid-0.16.0/spec/celluloid/evented_mailbox_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/celluloid-0.16.0/spec/celluloid/evented_mailbox_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/celluloid-0.16.0/spec/celluloid/evented_mailbox_spec.rb
scoot-0.0.4 .bundle/gems/ruby/2.2.0/gems/celluloid-0.16.0/spec/celluloid/evented_mailbox_spec.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/celluloid-0.16.0/spec/celluloid/evented_mailbox_spec.rb
celluloid-0.16.0 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.16.0.pre3 spec/celluloid/evented_mailbox_spec.rb
vagrant-tiktalik-0.0.3 vendor/bundle/ruby/2.0.0/gems/celluloid-0.15.2/spec/celluloid/evented_mailbox_spec.rb
celluloid-0.16.0.pre2 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.16.0.pre spec/celluloid/evented_mailbox_spec.rb
celluloid-0.15.2 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.15.1 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.15.0 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.15.0.pre2 spec/celluloid/evented_mailbox_spec.rb
celluloid-0.15.0.pre spec/celluloid/evented_mailbox_spec.rb