Sha256: e7de883d6d9e072676a7666d7d0c4f1b6f67906d57896a1ffc83e9dec6981aba
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'drbqs/connection.rb' describe DRbQS::ConnectionClient do before(:all) do @message = Rinda::TupleSpace.new @connection = DRbQS::ConnectionClient.new(@message) @node_id = 23 id_string = @connection.instance_variable_get(:@id_string) @message.write([id_string, @node_id]) end it "should get node ID." do @connection.get_id.should == @node_id @message.take([:server, :connect, nil], 0).should be_true end it "should get no initialization method." do @connection.get_initialization.should be_nil end it "should get initialization" do ary = [:initialize, [1, 2], :size, []] @message.write(ary) @connection.get_initialization.should == ary[1..-1] end it "should respond :alive_p signal" do @message.write([@node_id, :alive_p]) @connection.respond_signal @message.take([:server, :alive, nil], 0).should be_true end it "should respond :exit signal" do @message.write([@node_id, :exit]) @connection.respond_signal.should == :exit end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
drbqs-0.0.10 | spec/connection_spec.rb |