Sha256: c5caaa80e3b790d6c46f5776db1b44a8672f98b4d82a0c549043fcd5d114918a

Contents?: true

Size: 504 Bytes

Versions: 4

Compression:

Stored size: 504 Bytes

Contents

require 'spec_helper'

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

4 entries across 4 versions & 1 rubygems

Version Path
protobuf-1.4.2 spec/unit/rpc/connectors/zmq_spec.rb
protobuf-1.4.1 spec/unit/rpc/connectors/zmq_spec.rb
protobuf-1.4.0 spec/unit/rpc/connectors/zmq_spec.rb
protobuf-1.3.0 spec/unit/rpc/connectors/zmq_spec.rb