Sha256: 3efdff5f6f3af9e61a09f26d86fb8fae2ccaed585a8704f98773b83d3988593c

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

require 'spec_helper'
require 'protobuf/zmq'

describe ::Protobuf::Rpc::Connectors::Zmq do
  let(:socket_mock) do
    sm = mock(::ZMQ::Socket)
    sm.stub(:connect).and_return(0)
    sm
  end

  let(:zmq_context_mock) do
    zc = mock(::ZMQ::Context)
    zc.stub(:socket).and_return(socket_mock)
    zc
  end

  before(:each) do
    ::ZMQ::Context.stub(:new).and_return(zmq_context_mock)
  end

  it 'raises if async is true' do
    expect {
      described_class.new(async: true).send_request
    }.to raise_error
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
protobuf-2.0.0.rc3 spec/lib/protobuf/rpc/connectors/zmq_spec.rb
protobuf-2.0.0.rc2 spec/lib/protobuf/rpc/connectors/zmq_spec.rb
protobuf-2.0.0.rc1 spec/lib/protobuf/rpc/connectors/zmq_spec.rb