From 04965d7d7a9cd34265d41c5870e6043ff24b3e4d Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Wed, 27 Jul 2011 15:46:43 -0700 Subject: (#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 (cherry picked from commit e0d3f11fc7b580aedec5350dc41a01417d6acd8d) --- spec/unit/type/file_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/unit/type/file_spec.rb b/spec/unit/type/file_spec.rb index 010b59f78..24141a9ef 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 -- cgit