Sha256: f613ce0c8818951ba97ed2ce3bb3ffc3c012967091190110ec6bc0926f4b2c7d
Contents?: true
Size: 646 Bytes
Versions: 16
Compression:
Stored size: 646 Bytes
Contents
require "spec_helper" describe Invoker::CLI::Pinger do let(:unix_client) { Invoker::IPC::UnixClient.new } let(:pinger) { Invoker::CLI::Pinger.new(unix_client) } let(:pong) { MM::Pong.new(status: 'pong') } context "If Invoker is running" do it "should return true" do unix_client.expects(:send_and_receive).returns(pong) expect(pinger.invoker_running?).to be_truthy end end context "if Invoker is not running" do it "should return false" do unix_client.expects(:send_and_receive).returns(nil) unix_client.expects(:abort).never expect(pinger.invoker_running?).to be_falsey end end end
Version data entries
16 entries across 16 versions & 3 rubygems