Sha256: 0e765feadbc98890996569c88943e0ae5657e072d6b8ce21eab29c2fabbaa660

Contents?: true

Size: 582 Bytes

Versions: 5

Compression:

Stored size: 582 Bytes

Contents

require 'pione/test-helper'

describe Pione::Agent::Messenger do
  before do
    @io = StringIO.new("", "w+")
    tuple_space = TestHelper::TupleSpace.create(self)
    receiver = Log::CUIMessageLogReceiver.new(@io)
    @messenger = Agent::Messenger.new(tuple_space, receiver, "fake session id")
  end

  after do
    @messenger.terminate
  end

  it "should take messages" do
    write(TupleSpace::MessageTuple.new(type: "test", head: "test", color: :green, contents: "test", level: 0))
    @messenger.start
    sleep 1
    @io.string.lines.to_a.compact.size.should == 1
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pione-0.5.0 test/agent/spec_messenger.rb
pione-0.5.0.alpha.2 test/agent/spec_messenger.rb
pione-0.5.0.alpha.1 test/agent/spec_messenger.rb
pione-0.4.2 test/agent/spec_messenger.rb
pione-0.4.1 test/agent/spec_messenger.rb