summaryrefslogtreecommitdiffstats
path: root/spec/unit/other
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-25 17:14:13 -0500
committerLuke Kanies <luke@madstop.com>2007-08-25 17:14:13 -0500
commit9df4fd1f2188c90190e33e165206e7931938607b (patch)
tree071a42fa559ffd800a4d0e586a8bd05f0e31f3a1 /spec/unit/other
parentba3a861af2e5c30fd9bbbe0e1666fa316139113b (diff)
downloadpuppet-9df4fd1f2188c90190e33e165206e7931938607b.tar.gz
puppet-9df4fd1f2188c90190e33e165206e7931938607b.tar.xz
puppet-9df4fd1f2188c90190e33e165206e7931938607b.zip
And we have multiple environment support in the parser. The only remaining piece to make this complete is to add multiple environment support to the fileserver. I also renamed Configuration.rb to Compile.rb (that is, I fixed all the classes that used to know it as a configuration).
Diffstat (limited to 'spec/unit/other')
-rwxr-xr-xspec/unit/other/modules.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/other/modules.rb b/spec/unit/other/modules.rb
index 1afd3d863..0ab37aa9e 100755
--- a/spec/unit/other/modules.rb
+++ b/spec/unit/other/modules.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.dirname(__FILE__) + '/../../spec_helper'
describe Puppet::Module, " when building its search path" do
include PuppetTest
@@ -87,6 +87,12 @@ describe Puppet::Module, " when searching for templates" do
Puppet::Module.find_template("mymod/mytemplate").should == "/my/templates/mymod/mytemplate"
end
+ it "should return unqualified templates directly in the template dir" do
+ Puppet.config.expects(:value).with(:templatedir, nil).returns("/my/templates")
+ Puppet::Module.expects(:find).never
+ Puppet::Module.find_template("mytemplate").should == "/my/templates/mytemplate"
+ end
+
it "should use the environment templatedir if no module is found and an environment is specified" do
Puppet.config.expects(:value).with(:templatedir, "myenv").returns("/myenv/templates")
Puppet::Module.expects(:find).with("mymod", "myenv").returns(nil)