summaryrefslogtreecommitdiffstats
path: root/spec/unit/network
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2010-06-30 12:19:29 -0700
committerMarkus Roberts <Markus@reality.com>2010-07-01 13:48:03 -0700
commit75e0662168936da8255507a10bccad8889326947 (patch)
tree93e30eb595a8d49f00c02634cfa5be3d4dc6f14a /spec/unit/network
parent3cd48d836c9ffe4e59bca78f1033020cecf63354 (diff)
downloadpuppet-75e0662168936da8255507a10bccad8889326947.tar.gz
puppet-75e0662168936da8255507a10bccad8889326947.tar.xz
puppet-75e0662168936da8255507a10bccad8889326947.zip
[#4090] Rename mode (:master, :agent, :user) to run_mode
Mode is a terribly overused word. Files use it, puppetdoc uses it, and certs use it, and those are just the places that I happened to stumble upon. It makes reading code very confusing and finding things in code difficult. I know namespacing allows us to reuse words for method and variable names, but that doesn't mean we should.
Diffstat (limited to 'spec/unit/network')
-rwxr-xr-xspec/unit/network/http/webrick_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/network/http/webrick_spec.rb b/spec/unit/network/http/webrick_spec.rb
index aaab53b0c..34abc6909 100755
--- a/spec/unit/network/http/webrick_spec.rb
+++ b/spec/unit/network/http/webrick_spec.rb
@@ -211,8 +211,8 @@ describe Puppet::Network::HTTP::WEBrick do
@server.setup_logger
end
- it "should use the masterlog if the process mode is master" do
- Puppet.mode.stubs(:master?).returns(true)
+ it "should use the masterlog if the run_mode is master" do
+ Puppet.run_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 mode is not master" do
- Puppet.mode.stubs(:master?).returns(false)
+ it "should use the httplog if the run_mode is not master" do
+ Puppet.run_mode.stubs(:master?).returns(false)
Puppet.settings.expects(:value).with(:httplog).returns "/other/log"
File.expects(:open).with("/other/log", "a+").returns @filehandle