Sha256: 6fc9eb3e9f3580d4c5a829c7324a7f469db381a58c2023d62f70a840b3690d7b

Contents?: true

Size: 630 Bytes

Versions: 5

Compression:

Stored size: 630 Bytes

Contents

# To run these specs using rake, make sure the 'bones' and 'bones-extras'
# gems are installed. Then execute 'rake spec' from the main directory
# to run all specs.

require File.expand_path(
File.join(File.dirname(__FILE__), %w[.. lib ffi-rzmq]))

Thread.abort_on_exception = true

SPEC_CTX = ZMQ::Context.new 1
def spec_ctx
  SPEC_CTX
end

module APIHelper
  def stub_libzmq
    @err_str_mock = mock("error string")

    LibZMQ.stub!(
    :zmq_init => 0,
    :zmq_errno => 0,
    :zmq_sterror => @err_str_mock
    )
  end

  # generate a random port between 10_000 and 65534
  def random_port
    rand(55534) + 10_000
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ffi-rzmq-0.8.2 spec/spec_helper.rb
ffi-rzmq-0.8.0 spec/spec_helper.rb
ffi-rzmq-0.7.2 spec/spec_helper.rb
ffi-rzmq-0.7.1 spec/spec_helper.rb
ffi-rzmq-0.7.0 spec/spec_helper.rb