diff options
Diffstat (limited to 'spec/unit/network')
| -rwxr-xr-x | spec/unit/network/server_spec.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/spec/unit/network/server_spec.rb b/spec/unit/network/server_spec.rb index ccd9c082e..c2496dcca 100755 --- a/spec/unit/network/server_spec.rb +++ b/spec/unit/network/server_spec.rb @@ -5,6 +5,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/network/server' +require 'puppet/network/handler' describe Puppet::Network::Server do before do @@ -161,11 +162,7 @@ describe Puppet::Network::Server do describe "when creating its pidfile" do it "should use an exclusive mutex" do Puppet.settings.expects(:value).with(:name).returns "me" - - sync = mock 'sync' - Puppet::Util.expects(:sync).with("me").returns sync - - sync.expects(:synchronize).with(Sync::EX) + Puppet::Util.expects(:synchronize_on).with("me",Sync::EX) @server.create_pidfile end @@ -198,11 +195,7 @@ describe Puppet::Network::Server do describe "when removing its pidfile" do it "should use an exclusive mutex" do Puppet.settings.expects(:value).with(:name).returns "me" - - sync = mock 'sync' - Puppet::Util.expects(:sync).with("me").returns sync - - sync.expects(:synchronize).with(Sync::EX) + Puppet::Util.expects(:synchronize_on).with("me",Sync::EX) @server.remove_pidfile end |
