summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-20 01:08:34 -0600
committerLuke Kanies <luke@madstop.com>2007-11-20 01:08:34 -0600
commit8cc07adda20b4e63bbad5b2759303d00d215341c (patch)
treee8157ba56cabb51ba67d9eb8d355a40ef4e96c4c /spec/integration
parent53008e567fd64f391e0b45652b2f4ac1551ccf47 (diff)
Using the Environment class to determine the default environment,
rather than plenty of different places having the logic of how to determine the default environment.
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/indirector/module_files.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/integration/indirector/module_files.rb b/spec/integration/indirector/module_files.rb
index 3f49ec7fa..1831bffbc 100755
--- a/spec/integration/indirector/module_files.rb
+++ b/spec/integration/indirector/module_files.rb
@@ -10,10 +10,11 @@ require 'puppet/indirector/module_files'
describe Puppet::Indirector::ModuleFiles, " when interacting with Puppet::Module and FileServing::Content" do
it "should look for files in the module's 'files' directory" do
+ Puppet::Node::Environment.stubs(:new).returns(stub('env', :name => "myenv"))
# We just test a subclass, since it's close enough.
@terminus = Puppet::Indirector::FileContent::Modules.new
@module = Puppet::Module.new("mymod", "/some/path/mymod")
- Puppet::Module.expects(:find).with("mymod", nil).returns(@module)
+ Puppet::Module.expects(:find).with("mymod", "myenv").returns(@module)
filepath = "/some/path/mymod/files/myfile"
@@ -25,9 +26,10 @@ end
describe Puppet::Indirector::ModuleFiles, " when interacting with FileServing::Fileset and FileServing::Content" do
it "should return an instance for every file in the fileset" do
+ Puppet::Node::Environment.stubs(:new).returns(stub('env', :name => "myenv"))
@terminus = Puppet::Indirector::FileContent::Modules.new
@module = Puppet::Module.new("mymod", "/some/path/mymod")
- Puppet::Module.expects(:find).with("mymod", nil).returns(@module)
+ Puppet::Module.expects(:find).with("mymod", "myenv").returns(@module)
filepath = "/some/path/mymod/files/myfile"
FileTest.stubs(:exists?).with(filepath).returns(true)