summaryrefslogtreecommitdiffstats
path: root/spec/unit/module.rb
diff options
context:
space:
mode:
authorThom May <thom@virelais.nyc.joostas.com>2008-11-26 14:58:27 -0500
committerJames Turnbull <james@lovedthanlost.net>2008-11-29 09:41:51 +1100
commit3c4efa7ec2043043d72d325e67fe5bd6098e0413 (patch)
tree7e8fcff95678231c3f07a8d6b7df8c326979109a /spec/unit/module.rb
parent3a395095d7b913661484bc5caeeb90cb34cd5b3f (diff)
downloadpuppet-3c4efa7ec2043043d72d325e67fe5bd6098e0413.tar.gz
puppet-3c4efa7ec2043043d72d325e67fe5bd6098e0413.tar.xz
puppet-3c4efa7ec2043043d72d325e67fe5bd6098e0413.zip
Fixes #1773 - no longer check for absolute paths
Diffstat (limited to 'spec/unit/module.rb')
-rwxr-xr-xspec/unit/module.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/module.rb b/spec/unit/module.rb
index a6608fc1b..1deaec232 100755
--- a/spec/unit/module.rb
+++ b/spec/unit/module.rb
@@ -114,6 +114,12 @@ describe Puppet::Module, " when searching for templates" do
Puppet::Module.find_template("mytemplate").should == "/my/templates/mytemplate"
end
+ it "should accept relative templatedirs" do
+ Puppet[:templatedir] = "my/templates"
+ File.expects(:directory?).with(File.join(Dir.getwd,"my/templates")).returns(true)
+ Puppet::Module.find_template("mytemplate").should == File.join(Dir.getwd,"my/templates/mytemplate")
+ end
+
it "should use the environment templatedir if no module is found and an environment is specified" do
Puppet::Module.stubs(:templatepath).with("myenv").returns(["/myenv/templates"])
Puppet::Module.expects(:find).with("mymod", "myenv").returns(nil)