Sha256: fc89b8d148a4009c030dcd65f5c35c42f4db8b2f9a90717a60644de283f21f88
Contents?: true
Size: 967 Bytes
Versions: 11
Compression:
Stored size: 967 Bytes
Contents
require 'spec_helper' require 'spec/support/test/resource_service' require 'protobuf/rpc/servers/socket_runner' require 'protobuf/socket' describe Protobuf::Rpc::Socket::Server do before(:each) do load 'protobuf/socket.rb' end before(:all) do load 'protobuf/socket.rb' Thread.abort_on_exception = true @options = OpenStruct.new(:host => "127.0.0.1", :port => 9399, :backlog => 100, :threshold => 100) @runner = ::Protobuf::Rpc::SocketRunner.new(@options) @server = @runner.instance_variable_get(:@server) @server_thread = Thread.new(@runner) { |runner| runner.run } Thread.pass until @server.running? end after(:all) do @server.stop @server_thread.join end it "Runner provides a stop method" do expect(@runner).to respond_to(:stop) end it "provides a stop method" do expect(@server).to respond_to(:stop) end it "signals the Server is running" do expect(@server).to be_running end end
Version data entries
11 entries across 11 versions & 1 rubygems