From 7c68fdb46802dbd3a57f5f7be3333ed6feacad45 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Wed, 27 Aug 2008 21:53:00 -0700 Subject: 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 --- spec/unit/file_serving/base.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/unit') 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" -- cgit