Sha256: e7202105d7b83029221573a50e10ea2c6536bff222f2497e76fdc88f805d2bbc

Contents?: true

Size: 805 Bytes

Versions: 20

Compression:

Stored size: 805 Bytes

Contents

require "spec_helper"

describe Invoker::IPC::UnixClient do
  let(:unix_client) { described_class.new }
  let(:socket) { StringIO.new }

  describe "serializing a " do
    it "list request should work" do
      unix_client.expects(:open_client_socket).yields(socket)
      unix_client.send_command("list")

      expect(socket.string).to match(/list/)
    end

    it "add request should work" do
      unix_client.expects(:open_client_socket).yields(socket)
      unix_client.send_command("add", process_name: "hello")

      expect(socket.string).to match(/hello/)
    end
  end

  describe ".send_command" do
    it "calls the send_command instance method" do
      Invoker::IPC::UnixClient.any_instance.expects(:send_command).once
      Invoker::IPC::UnixClient.send_command("list")
    end
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
itrg-invoker-1.6.1 spec/invoker/ipc/unix_client_spec.rb
itrg-invoker-1.6.0 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.8 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.7 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.6 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.5 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.4 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.3 spec/invoker/ipc/unix_client_spec.rb
meepo-1.5.2 spec/invoker/ipc/unix_client_spec.rb
invoker-1.5.1 spec/invoker/ipc/unix_client_spec.rb
invoker-1.4.1 spec/invoker/ipc/unix_client_spec.rb
invoker-1.4.0 spec/invoker/ipc/unix_client_spec.rb
invoker-1.3.2 spec/invoker/ipc/unix_client_spec.rb
invoker-1.3.1 spec/invoker/ipc/unix_client_spec.rb
invoker-1.3.0 spec/invoker/ipc/unix_client_spec.rb
invoker-1.2.0 spec/invoker/ipc/unix_client_spec.rb
invoker-1.2.0.pre2 spec/invoker/ipc/unix_client_spec.rb
invoker-1.2.0.pre1 spec/invoker/ipc/unix_client_spec.rb
invoker-1.2.0.pre spec/invoker/ipc/unix_client_spec.rb
invoker-1.1.0 spec/invoker/ipc/unix_client_spec.rb