Sha256: ffd53a2fae87e30944d5bca905de6b7537f22de478b4d6d83ec3c31318fb90a0
Contents?: true
Size: 756 Bytes
Versions: 20
Compression:
Stored size: 756 Bytes
Contents
require "spec_helper" describe Invoker::Daemon do let(:daemon) { Invoker::Daemon.new} describe "#start" do context "when daemon is aleady running" do it "exits without any error" do daemon.expects(:running?).returns(true) begin daemon.start rescue SystemExit => e expect(e.status).to be(0) end end end context "when daemon is not running" do it "starts the daemon" do daemon.expects(:dead?).returns(false) daemon.expects(:running?).returns(false) daemon.expects(:daemonize) daemon.start end end end describe "#stop" do it "stops the daemon" do daemon.expects(:kill_process) daemon.stop end end end
Version data entries
20 entries across 20 versions & 3 rubygems