Signed-off-by: Nick Lewis <[email protected]>
---
spec/unit/file_serving/fileset_spec.rb | 8 ++++++++
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 ecc7781..76819e6 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 slash" do
+ path = "/some/path/with/trailing/slash"
+ path_with_slash = "#{path}/"
+ File.stubs(:lstat).with(path).returns stub('stat')
+ fileset = Puppet::FileServing::Fileset.new(path_with_slash)
+ 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)
--
1.7.4.1
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.