Sha256: 58f31dda84195240308ff6d4704326e2051e818a8b1f3b2bcaf7e329982e313e
Contents?: true
Size: 643 Bytes
Versions: 4
Compression:
Stored size: 643 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_true 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_false end end end
Version data entries
4 entries across 4 versions & 1 rubygems