diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2011-07-27 15:46:43 -0700 |
|---|---|---|
| committer | Josh Cooper <josh@puppetlabs.com> | 2011-07-27 15:46:43 -0700 |
| commit | e0d3f11fc7b580aedec5350dc41a01417d6acd8d (patch) | |
| tree | f58bf7d578711fcb5b6e5bb4475fed10561ac15b | |
| parent | f883648d2f6e4c357263c0cf3aa39afd63d852d7 (diff) | |
| download | puppet-e0d3f11fc7b580aedec5350dc41a01417d6acd8d.tar.gz puppet-e0d3f11fc7b580aedec5350dc41a01417d6acd8d.tar.xz puppet-e0d3f11fc7b580aedec5350dc41a01417d6acd8d.zip | |
(#8663) Drive letters are not valid absolute paths on Windows
One of the file spec tests was attempting to use X: as a fully
qualified file path, and the file type was correctly rejecting it,
since it is a relative path. This commit changes the spec test to
expect the file type to raise an exception.
Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>
| -rwxr-xr-x | spec/unit/type/file_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/unit/type/file_spec.rb b/spec/unit/type/file_spec.rb index f416e987a..6be8acfca 100755 --- a/spec/unit/type/file_spec.rb +++ b/spec/unit/type/file_spec.rb @@ -305,9 +305,8 @@ describe Puppet::Type.type(:file) do file[:path].should == "X:/" end - it "should add a slash to a drive letter", :'fails_on_windows' => true, :'fails_on_ruby_1.9.2' => true do - file = Puppet::Type::File.new(:path => "X:") - file[:path].should == "X:/" + it "should not accept a drive letter without a slash", :'fails_on_ruby_1.9.2' => true do + lambda { Puppet::Type::File.new(:path => "X:") }.should raise_error(/File paths must be fully qualified/) end end |
