summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector/file_spec.rb
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/indirector/file_spec.rb
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/indirector/file_spec.rb')
-rwxr-xr-xspec/unit/indirector/file_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/indirector/file_spec.rb b/spec/unit/indirector/file_spec.rb
index 207d897bf..2505a0cd5 100755
--- a/spec/unit/indirector/file_spec.rb
+++ b/spec/unit/indirector/file_spec.rb
@@ -30,15 +30,15 @@ describe Puppet::Indirector::File do
@searcher.should respond_to(:find)
end
- it "should use the server data directory plus the indirection name if the process mode is master" do
- Puppet.mode.expects(:master?).returns true
+ it "should use the server data directory plus the indirection name if the run_mode is master" do
+ Puppet.run_mode.expects(:master?).returns true
Puppet.settings.expects(:value).with(:server_datadir).returns "/my/dir"
@searcher.data_directory.should == File.join("/my/dir", "mystuff")
end
- it "should use the client data directory plus the indirection name if the process mode is not master" do
- Puppet.mode.expects(:master?).returns false
+ it "should use the client data directory plus the indirection name if the run_mode is not master" do
+ Puppet.run_mode.expects(:master?).returns false
Puppet.settings.expects(:value).with(:client_datadir).returns "/my/dir"
@searcher.data_directory.should == File.join("/my/dir", "mystuff")