X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=spec%2Funit%2Fwindows_daemon_spec.rb;fp=spec%2Funit%2Fwindows_daemon_spec.rb;h=0000000000000000000000000000000000000000;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=6f56a44ea360923c4522ac6ad015276eaa65c310;hpb=8a3fe7daeecccf43dd71c59371c5005400d35101;p=packages%2Fprecise%2Fmcollective.git diff --git a/spec/unit/windows_daemon_spec.rb b/spec/unit/windows_daemon_spec.rb deleted file mode 100755 index 6f56a44..0000000 --- a/spec/unit/windows_daemon_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env rspec - -require 'spec_helper' - -module MCollective - if Util.windows? - require 'mcollective/windows_daemon' - - describe WindowsDaemon do - describe "#daemonize_runner" do - it "should only run on the windows platform" do - Util.expects("windows?").returns(false) - expect { WindowsDaemon.daemonize_runner }.to raise_error("The Windows Daemonizer should only be used on the Windows Platform") - end - - it "should not support writing pid files" do - expect { WindowsDaemon.daemonize_runner(true) }.to raise_error("Writing pid files are not supported on the Windows Platform") - end - - it "should start the mainloop" do - WindowsDaemon.expects(:mainloop) - WindowsDaemon.daemonize_runner - end - end - - describe "#service_stop" do - it "should disconnect and exit" do - Log.expects(:info) - - connector = mock - connector.expects(:disconnect).once - - PluginManager.expects("[]").with("connector_plugin").returns(connector) - - d = WindowsDaemon.new - d.expects("exit!").once - - d.service_stop - end - end - end - end -end