summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-01-15 15:13:28 -0600
committerJames Turnbull <james@lovedthanlost.net>2009-02-13 14:16:35 +1100
commit4e89156b21b287b683c27a4cd691856c4e378a62 (patch)
treee4b1b3e607682d32d6eae5fd3b5b6c08ac3e1130 /lib
parentcc4d6586d420f4beea1eeef85cfe7a28f8e493ac (diff)
downloadpuppet-4e89156b21b287b683c27a4cd691856c4e378a62.tar.gz
puppet-4e89156b21b287b683c27a4cd691856c4e378a62.tar.xz
puppet-4e89156b21b287b683c27a4cd691856c4e378a62.zip
Migrated FileType tests to spec, and fleshed them out a bit.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/util/filetype.rb6
1 files changed, 3 insertions, 3 deletions
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