summaryrefslogtreecommitdiffstats
path: root/spec/unit/file_serving/fileset_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/file_serving/fileset_spec.rb')
-rwxr-xr-xspec/unit/file_serving/fileset_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/file_serving/fileset_spec.rb b/spec/unit/file_serving/fileset_spec.rb
index a369ad39c..41810650a 100755
--- a/spec/unit/file_serving/fileset_spec.rb
+++ b/spec/unit/file_serving/fileset_spec.rb
@@ -20,6 +20,13 @@ describe Puppet::FileServing::Fileset, " when initializing" do
fileset.path.should == path
end
+ it "should not fail if the path is just the file separator" do
+ path = File::SEPARATOR
+ File.stubs(:lstat).with(path).returns stub('stat')
+ fileset = Puppet::FileServing::Fileset.new(path)
+ 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)