From 4e89156b21b287b683c27a4cd691856c4e378a62 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 15 Jan 2009 15:13:28 -0600 Subject: Migrated FileType tests to spec, and fleshed them out a bit. Signed-off-by: Luke Kanies --- lib/puppet/util/filetype.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/puppet/util/filetype.rb b/lib/puppet/util/filetype.rb index 60cbc77e7..60380d5f1 100755 --- a/lib/puppet/util/filetype.rb +++ b/lib/puppet/util/filetype.rb @@ -74,7 +74,7 @@ class Puppet::Util::FileType # Back the file up before replacing it. def backup - bucket.backup(@path) if FileTest.exists?(@path) + bucket.backup(@path) if File.exists?(@path) end # Pick or create a filebucket to use. @@ -92,7 +92,7 @@ class Puppet::Util::FileType newfiletype(:flat) do # Read the file. def read - if File.exists?(@path) + if File.exist?(@path) File.read(@path) else return nil @@ -101,7 +101,7 @@ class Puppet::Util::FileType # Remove the file. def remove - if File.exists?(@path) + if File.exist?(@path) File.unlink(@path) end end -- cgit