Sha256: c72844828ec84ea615f059ce7b90e01baba8e1ead756c489b952e87602021164

Contents?: true

Size: 721 Bytes

Versions: 6

Compression:

Stored size: 721 Bytes

Contents

if __FILE__ == $0
    $:.unshift '..'
    $:.unshift '../../lib'
    $puppetbase = "../.."
end

require 'puppet'
require 'puppet/parsedfile'
require 'puppettest'
require 'test/unit'

class TestParsedFile < Test::Unit::TestCase
	include TestPuppet
    def test_file
        file = nil
        path = tempfile()
        File.open(path, "w") { |f| f.puts "yayness" }
        assert_nothing_raised {
            file = Puppet::ParsedFile.new(path)
        }

        assert(!file.changed?, "File incorrectly returned changed")

        sleep(1)
        File.open(path, "w") { |f| f.puts "booness" }

        assert(file.changed?, "File did not catch change")
    end
end

# $Id: parsedfile.rb 724 2005-10-22 22:27:20Z luke $

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
puppet-0.13.2 test/other/parsedfile.rb
puppet-0.13.6 test/other/parsedfile.rb
puppet-0.13.1 test/other/parsedfile.rb
puppet-0.13.0 test/other/parsedfile.rb
puppet-0.16.0 test/other/parsedfile.rb
puppet-0.9.2 test/other/parsedfile.rb