<commit_before>require_relative "spec_helper"

describe CZMQ::FFI::Zsock do
  context "with a zsock" do
    i = 0
    let(:endpoint) { "inproc://endpoint_#{i+=1}" }
    let(:zobj) { described_class.new_pair(endpoint) }
    let(:use_pointer) { zobj.endpoint }
    include_examples "a zclass"
  end
end<commit_msg>add some very basic specs (extracted from cztop)<commit_after>require_relative "spec_helper"

describe CZMQ::FFI::Zsock do
  context "with a zsock" do
    i = 0
    let(:endpoint) { "inproc://endpoint_#{i+=1}" }
    let(:zobj) { described_class.new_pair(endpoint) }
    let(:use_pointer) { zobj.endpoint }
    include_examples "a zclass"

    it "creates REP Zsock" do
      sock = described_class.new_rep(endpoint)
      refute_operator sock, :null?
    end

    it "creates REQ Zsock" do
      sock = described_class.new_req(endpoint)
      refute_operator sock, :null?
    end
  end
end
{'fraction_non_alphanumeric': 0.11764705882352941, 'fraction_numerical': 0.004439511653718091, 'mean_word_length': 3.6979166666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4319785', 'n_tokens_mistral': 325, 'n_tokens_neox': 314, 'n_words': 74}