Sha256: d034a751e8c11bc22ced2c2930b64cfe3a69eba4551d7cab6ae3fdc442c9a29a
Contents?: true
Size: 873 Bytes
Versions: 39
Compression:
Stored size: 873 Bytes
Contents
require 'spec_helper' require 'protobuf/rpc/servers/zmq/server' describe Protobuf::Rpc::Zmq::Server do subject { described_class.new(options) } let(:options) {{ :host => '127.0.0.1', :port => 9399, :worker_port => 9400, :workers_only => true }} before do load 'protobuf/zmq.rb' end after do subject.teardown end describe '.running?' do it 'returns true if running' do subject.instance_variable_set(:@running, true) subject.running?.should be_true end it 'returns false if not running' do subject.instance_variable_set(:@running, false) subject.running?.should be_false end end describe '.stop' do it 'sets running to false' do subject.instance_variable_set(:@workers, []) subject.stop subject.instance_variable_get(:@running).should be_false end end end
Version data entries
39 entries across 39 versions & 2 rubygems