summaryrefslogtreecommitdiffstats
path: root/spec/unit/file_serving
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-03-25 16:24:01 -0700
committerJesse Wolfe <jes5199@gmail.com>2011-03-25 16:24:01 -0700
commitcc43dd79ad8d40b5b7bf3f4480ff794e99f733a4 (patch)
tree22a21fb53c44bcb433dafb8bb373e3f41afde6eb /spec/unit/file_serving
parentc0236aab1145e01e26f59cf1d823dc6966ba567b (diff)
parent0fec21fcd887685cf8421fdc309b878088f9fc48 (diff)
Merge commit '2.6.next^1' into next
These changes were superseded by existing commits in next: lib/puppet/parser/compiler.rb spec/unit/parser/compiler_spec.rb
Diffstat (limited to 'spec/unit/file_serving')
-rwxr-xr-xspec/unit/file_serving/fileset_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/file_serving/fileset_spec.rb b/spec/unit/file_serving/fileset_spec.rb
index 1ef9cdc50..3b12c953e 100755
--- a/spec/unit/file_serving/fileset_spec.rb
+++ b/spec/unit/file_serving/fileset_spec.rb
@@ -13,6 +13,14 @@ describe Puppet::FileServing::Fileset, " when initializing" do
proc { Puppet::FileServing::Fileset.new("some/file") }.should raise_error(ArgumentError)
end
+ it "should not fail if the path is fully qualified, with a trailing separator" do
+ path = "/some/path/with/trailing/separator"
+ path_with_separator = "#{path}#{File::SEPARATOR}"
+ File.stubs(:lstat).with(path).returns stub('stat')
+ fileset = Puppet::FileServing::Fileset.new(path_with_separator)
+ fileset.path.should == path
+ end
+
it "should fail if its path does not exist" do
File.expects(:lstat).with("/some/file").returns nil
proc { Puppet::FileServing::Fileset.new("/some/file") }.should raise_error(ArgumentError)