summaryrefslogtreecommitdiffstats
path: root/spec/unit/file_serving
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-08-27 21:53:00 -0700
committerLuke Kanies <luke@madstop.com>2008-08-27 21:53:00 -0700
commit7c68fdb46802dbd3a57f5f7be3333ed6feacad45 (patch)
tree6e385b1a0fee71b86957e57f049a788ba8ee9b6a /spec/unit/file_serving
parentac419872e273dc31635f042bb1a23c7785dc227a (diff)
downloadpuppet-7c68fdb46802dbd3a57f5f7be3333ed6feacad45.tar.gz
puppet-7c68fdb46802dbd3a57f5f7be3333ed6feacad45.tar.xz
puppet-7c68fdb46802dbd3a57f5f7be3333ed6feacad45.zip
Fixing FileServing::Base so that it can recurse on a single file.
It was throwing exceptions if you tried to use it on a file instead of a directory. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/file_serving')
-rwxr-xr-xspec/unit/file_serving/base.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/file_serving/base.rb b/spec/unit/file_serving/base.rb
index 7cb95aa7a..6a76d81e9 100755
--- a/spec/unit/file_serving/base.rb
+++ b/spec/unit/file_serving/base.rb
@@ -81,6 +81,11 @@ describe Puppet::FileServing::Base do
@file.full_path.should == "/this/file"
end
+ it "should return the path if the relative_path is set to '.'" do
+ @file.relative_path = "."
+ @file.full_path.should == "/this/file"
+ end
+
it "should return the path joined with the relative path if there is a relative path and it is not set to '/' or ''" do
@file.relative_path = "not/qualified"
@file.full_path.should == "/this/file/not/qualified"