diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-05-12 18:25:14 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | ac7efc8f0284d6b35f5428da06ba371cf94998ec (patch) | |
| tree | c1a6a6df5dd2d533c1d0b12b869a0758b8c4cb6f /spec/unit/network/http/webrick.rb | |
| parent | 5665e3984f73c70b90f65dd8bf4445b5adda5121 (diff) | |
| download | puppet-ac7efc8f0284d6b35f5428da06ba371cf94998ec.tar.gz puppet-ac7efc8f0284d6b35f5428da06ba371cf94998ec.tar.xz puppet-ac7efc8f0284d6b35f5428da06ba371cf94998ec.zip | |
Feature #2935 Puppet::Mode#master?
Use a predicate function on the Mode object instead of comparing with
the executable name everywhere
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec/unit/network/http/webrick.rb')
| -rwxr-xr-x | spec/unit/network/http/webrick.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/network/http/webrick.rb b/spec/unit/network/http/webrick.rb index b8163fef7..aaab53b0c 100755 --- a/spec/unit/network/http/webrick.rb +++ b/spec/unit/network/http/webrick.rb @@ -211,8 +211,8 @@ describe Puppet::Network::HTTP::WEBrick do @server.setup_logger end - it "should use the masterlog if the process name is 'puppetmasterd'" do - Puppet.settings.stubs(:value).with(:name).returns "puppetmasterd" + it "should use the masterlog if the process mode is master" do + Puppet.mode.stubs(:master?).returns(true) Puppet.settings.expects(:value).with(:masterhttplog).returns "/master/log" File.expects(:open).with("/master/log", "a+").returns @filehandle @@ -220,8 +220,8 @@ describe Puppet::Network::HTTP::WEBrick do @server.setup_logger end - it "should use the httplog if the process name is not 'puppetmasterd'" do - Puppet.settings.stubs(:value).with(:name).returns "other" + it "should use the httplog if the process mode is not master" do + Puppet.mode.stubs(:master?).returns(false) Puppet.settings.expects(:value).with(:httplog).returns "/other/log" File.expects(:open).with("/other/log", "a+").returns @filehandle |
