Sha256: 614619c758221b96b9efe6c0f7b9bef24eca4184beb7a57e76e82cfda7ab6fda
Contents?: true
Size: 882 Bytes
Versions: 1
Compression:
Stored size: 882 Bytes
Contents
require 'spec_helper' module NNCore describe "nn_term" do context "given an initialized library and" do context "given a valid socket" do before(:each) do @socket = LibNanomsg.nn_socket(AF_SP, NN_PUB) end after(:each) do LibNanomsg.nn_close(@socket) end it "makes subsequent calls to nn_send fail with ETERM" do LibNanomsg.nn_term rc = LibNanomsg.nn_send(0, "ABC", 3, 0) rc.should == -1 LibNanomsg.nn_errno.should == ETERM end # it "makes subsequent calls to nn_recv fail with ETERM" do # LibNanomsg.nn_term # buffer = FFI::MemoryPointer.new(:pointer) # rc = LibNanomsg.nn_recv(@socket, buffer, NN_MSG, 0) # rc.should == -1 # LibNanomsg.nn_errno.should == ETERM # end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nn-core-0.2.1 | spec/nn_term_spec.rb |